WWW-Mechanize-Chrome
view release on metacpan or search on metacpan
lib/WWW/Mechanize/Chrome.pm view on Meta::CPAN
=item B<keys> - reference of the array to send as keystrokes
=item B<delay> - delay in ms to sleep between keys
=back
=cut
sub sendkeys_future( $self, %options ) {
$options{ keys } ||= [ map +{ type => 'char', text => $_ },
split m//, $options{ string }
];
my $f = Future->done(1);
for my $key (@{ $options{ keys }}) {
$f = $f->then(sub {
$self->target->send_message('Input.dispatchKeyEvent', %$key );
});
if( defined $options{ delay }) {
$f->then(sub {
( run in 1.740 second using v1.01-cache-2.11-cpan-71847e10f99 )