$mech->submit_form(
form_number => 3,
fields => {
username => 'mungo',
password => 'lost-and-alone',
}
);
| [reply] [d/l] |
it's a nameless form <form> .... </form>
i have checked for form number using $mech->forms()
which displays nothing .
| [reply] |
"i have checked for form number using $mech->forms() which displays nothing."
This might be due to JavaScript generated forms, which are really a pain in the ***. Try to look at the source through your preferred webbrowser and see what's going on there. If the form is there, without a name, indeed simply count them (and don't forget hidden forms ;-)
| [reply] |
$mech->form_number(3); # selects the third form on the page
$mech->submit; # submits the third form
| [reply] [d/l] |
Count, you know 1, 2, 3, 4, 5 , 6, 7, 8, 9, 10,
them select the form 3rd form on the page
| [reply] |