in reply to Re: Problem in login in web page (JS)
in thread Problem in login in web page
Hi again what is your opinion about this code !!!!!
use strict; use warnings; use strict; use WWW::Mechanize; use LWP ; use HTTP::Cookies; my $url = 'http://2010.tct.ir/CustomerSignIn.aspx'; my $username = 'X'; my $password = 'Y'; my $mech = WWW::Mechanize->new( agent=>"Mozilla/5.0 (X11; U; Linux i68 +6; en-US; rv:1.7) Gecko/20040918 Firefox/0.9.3 ") ; my $cookies = HTTP::Cookies->new(file => './lwp_cookies.dat' , autosav +e => 1 ,) ; $mech->cookie_jar($cookies) ; $mech->post($url) ; $mech->form_id('Form1') ; $mech->field('LoginControl$FileIDTextBox'=> $username) ; $mech->field('LoginControl$PasswordTextBox'=>$password) ; $mech->submit ('LoginControl$ButtonSignInn') ; print $mech->content() , "\n" ;
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^3: Problem in login in web page (JS)
by LanX (Saint) on Sep 28, 2018 at 17:37 UTC |