Skip to content

Commit

Permalink
Add option to click element.
Browse files Browse the repository at this point in the history
  • Loading branch information
norm committed Nov 27, 2011
1 parent 52eed29 commit 4a78087
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions webkit2png-driver
Expand Up @@ -325,6 +325,11 @@ sub get_args_for {
if get_key($section, 'noimages');

my $javascript = get_key($section, 'js');
my $click = get_key($section, 'click');
if ( !defined $javascript && defined $click ) {
$javascript = qq(\$('${click}').trigger('click'););
}

my $timeout = get_key($section, 'timeout');
if ( defined $javascript && defined $timeout ) {
$javascript = "setTimeout( function() { ${javascript}; }, $timeout )"
Expand Down

0 comments on commit 4a78087

Please sign in to comment.