Thread

Posted on Wed Aug 10 20:42:15 2005 by irma
submit_form() and content of the new page
Hi, This is my first time playing with Win32::IE::Mechanize, and I am encountering a strange behavior. On IE, I see that the following code succesfully logged me in and redirected me to the next page. However, $ie->content still contains the html of the login page. When I tried the following code for paypal, it works just fine. Does anyone have any idea?
use Win32::IE::Mechanize; my $ie = Win32::IE::Mechanize->new( visible => 1 ); $ie->get( 'https://xxx.xxx.com' ); $ie->submit_form( form_name => 'frmLogin', fields => { txtUser => 'aaa', txtPass => 'bbb', }, button => 'Login', ); die unless ($ie->success); print $ie->content;
Direct Responses: 1303 | Write a response
Posted on Fri Nov 11 16:28:46 2005 by abeltje in response to 871
Re: submit_form() and content of the new page
[Sorry, I never got an email to notify me of this message; hope this is not too late]
I have a suspicion this has to do with timing and determening when a page is fisnished loading.
I have released a beta version after you send this message, that re-implements the wait_while_busy logic in order to get a better indication of when IE has actually finished loading a page and put all the object's information in place.
Could you please try it and see if it solves your problem and let me know?

-- Abe.
Direct Responses: 2534 | Write a response
Posted on Sun Jun 25 17:00:23 2006 by erik in response to 1303
Re: submit_form() and content of the new page
I encounter many problems when trying to load a number of pages/forms in sequence. Very often my script gets interrupted because Mech tries to do something on a page that is not loaded. I have tried inserting extra wait_while_busy without any success. Inserting extra sleeps does help but slows it all down substantially. Really this is something that urgently need improvement in my opinion. It would also be great if the script does not interrupt when an error like this occurs but rather just moves on to the next task.
Write a response