On Tue, 1 Jun 2004, Nicholas S Zambo wrote:

I havent had a chance to look at the site, but what youre describing is 
something i come across every once and a while.  Instead of using a 
submit, try using a click() instead [with whatever the button name is]. 

ive had cases where using submit just seems to reload the same page, where 
clicking the submit button 'manually' works great.  

matt

 Hello all,
 
 I am trying to use the WWW::Mechanize module to script a login to a site 
 and check some numbers.  Seems pretty easy, I did it successfully with my 
 own site as a test, but now I'm trying to use it on 
 www.terrorexchange.com.  It's one of those faux stock-exchange sims 
 loosely based on current events.  Anyway, the program is little and 
 simple:
 
 my $mech = WWW::Mechanize->new();
 $mech -> agent_alias( 'Windows IE 6' );  #i've tried several agents here.
 $mech -> get("http://www.terrorexchange.com/";);
 $mech -> follow_link( text => 'Login' );
 $mech -> field("txtEmail" => "my_emailaddress");
 $mech -> field("txtPassword" => "my password");
 $mech -> submit();
 
 If you look at the site, it seems pretty cut and dry.  But for some 
 reason, the submit isn't working.  I just keep getting the login page. 
 There are some funny redirect things  going on with the site, so I don't 
 know if that's it.  I've looked at the response content for each step and 
 it all looks good until after the submit.  Almost like it's not doing 
 anything.
 
 Can anyone take a look and see if I'm just missing something stupid?  (Or 
 just being stupid)
 
 Thanks!
 Nick
  
 
 ==========
 The preceding e-mail message (including any attachments) contains 
 information that may be confidential, be protected by the attorney-client 
 or other applicable privileges, or constitute non-public information.  It 
 is intended to be conveyed only to the designated recipient(s).  If you 
 are not an intended recipient of this message, please notify the sender by 
 replying to this message and then delete it from your system.  Use, 
 dissemination, distribution, or reproduction of this message by unintended 
 recipients is not authorized and may be unlawful.
 ==========
 
 

-- 
gedanken

Reply via email to