Beefy Boxes and Bandwidth Generously Provided by pair Networks
Do you know where your variables are?
 
PerlMonks  

Re: Question for Win32::IE::Mechanize

by walto (Pilgrim)
on Mar 15, 2008 at 08:17 UTC ( [id://674343]=note: print w/replies, xml ) Need Help??


in reply to Question for Win32::IE::Mechanize

I found that it sometimes takes a while for Win32::IE::Mechanize to get a page and process the commands. It seems that $ie->success is not always relyable. What you can do is give a little more time to process your request adding sleep.
#!/usr/bin/perl use strict; use Win32::IE::Mechanize; my $username = '1234'; my $password = '1234'; my $url = "https://secure.10kwizard.com/login.php"; my $ie = Win32::IE::Mechanize->new( visible => 1 ); my $fn = "login"; #my $fn = 2; $ie->get( $url ); sleep 1; # or more if needed print $username."-".$password."-".$fn."\n"; print "first time-".$ie->uri."\n"; $ie->submit_form( form_name => $fn, fields => { email => $username, password => $password, }, ); sleep 1; # or more if needed print "second time-".$ie->uri; exit;

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others chanting in the Monastery: (4)
As of 2024-04-19 05:41 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found