Beefy Boxes and Bandwidth Generously Provided by pair Networks
No such thing as a small change
 
PerlMonks  

Re: Perl Mechanize and Single Sign On

by Gangabass (Vicar)
on Dec 09, 2014 at 13:06 UTC ( [id://1109718]=note: print w/replies, xml ) Need Help??


in reply to Perl Mechanize and Single Sign On

I'm sure you need to use `$mech->submit_form()` with `button` param.
$mech->submit_form( with_fields => { login_field => "somelogin", password_field => "somepassword", }, button => "your_submit_button_name", );
But may be some JavaScript magic is used by this webpage so you need to check headers submitted from your web browser (I use Firefox's HTTPFox add-on for this). Also there is no need to
$mech->cookie_jar(HTTP::Cookies->new());
because Mechanize will work with cookies by default...

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others cooling their heels in the Monastery: (4)
As of 2024-04-18 18:58 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found