Beefy Boxes and Bandwidth Generously Provided by pair Networks
Come for the quick hacks, stay for the epiphanies.
 
PerlMonks  

Re^2: WWW::Mechanize HTTPS

by BigRare (Pilgrim)
on May 26, 2005 at 13:38 UTC ( [id://460680]=note: print w/replies, xml ) Need Help??


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.

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://460680]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others avoiding work at the Monastery: (2)
As of 2024-04-26 03:20 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found