Come for the quick hacks, stay for the epiphanies. | |
PerlMonks |
Re^2: WWW::Mechanize HTTPSby BigRare (Pilgrim) |
on May 26, 2005 at 13:38 UTC ( [id://460680]=note: print w/replies, xml ) | Need Help?? |
I have found that sometimes using $mech->click() works in situations where $mech->submit() does not. For example: If I have a page that redirects to another page, based on a click input rather than a submit to the same URL. This becomes especially true in the world of dotNet where many submit buttons fire a JavaScript event to verify the form before allowing the page to be submitted. Usually, however, these same buttons have names and IDs, because that would be good website design. (Example: $mech->click('btnSubmit');) Though sometimes, just occasionally, buttons have neither a name nor and ID. This is where $mech->click() comes in handy. From the Documentation: If there is only one button on the form, $mech->click() with no arguments simply clicks that one button.
In Section
Seekers of Perl Wisdom
|
|