Hi. This may be fairly simple, but I do not see an obvious answer by looking through WWW::Mechanize's docs. I have a page that has 4 submit buttons, all with the same name, and I need to click on the 3rd one. I got it to work by muddling with the internal variables WWW::Mechanize uses, but I thought maybe there was a more friendly way to accomplish this.
Here's the working (albeit somewhat rude&dangerous) code:
my $form = $agent->current_form();
$agent->{req} = $form->find_input("list_PagingMove", undef, 3)->click($form);
$agent->{res} = $agent->_do_request();
I know I could simply use $agent->click("list_PagingMove"), except it clicks on the first button of that name that it finds, not the 3rd like I need.
In reply to using WWW::Mechanize with more than 1 submit button by revdiablo
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |