We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[email protected] reported on May 9, 2013
What version of the product are you using? On what operating system? 1.72_02 Would be nice if click() and click_button() could pass on the content_file/callback and/or read_size_hint to the request() method: Suggested changes: sub click { my ($self, $button, $x, $y, @args) = @_; for ($x, $y) { $_ = 1 unless defined; } my $request = $self->current_form->click($button, $x, $y); return $self->request( $request, @args ); } sub click_button { my $self = shift; my %args = @_; for ( keys %args ) { if ( !/^(number|name|value|input|x|y)$/ ) { $self->warn( qq{Unknown click_button parameter "$_"} ); } } for ($args{x}, $args{y}) { $_ = 1 unless defined; } my $form = $self->current_form or $self->die( 'click_button: No form has been selected' ); my $request; if ( $args{name} ) { $request = $form->click( $args{name}, $args{x}, $args{y} ); } elsif ( $args{number} ) { my $input = $form->find_input( undef, 'submit', $args{number} ); $request = $input->click( $form, $args{x}, $args{y} ); } elsif ( $args{input} ) { $request = $args{input}->click( $form, $args{x}, $args{y} ); } elsif ( $args{value} ) { my $i = 1; while ( my $input = $form->find_input(undef, 'submit', $i) ) { if ( $args{value} && ($args{value} eq $input->value) ) { $request = $input->click( $form, $args{x}, $args{y} ); last; } $i++; } # while } # $args{value} return $self->request( $request, $args{content_file} || $args{content_cb}, $args{read_size_hint}, ); }
Imported from Google Code issue 247 via archive
The text was updated successfully, but these errors were encountered:
No branches or pull requests
[email protected] reported on May 9, 2013
Details
Imported from Google Code issue 247 via archive
The text was updated successfully, but these errors were encountered: