in reply to Re: WWW::Mechanize HTTPS
in thread WWW::Mechanize HTTPS
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.