GHMON has asked for the wisdom of the Perl Monks concerning the following question:
Hi i wrote a code to login a web page but when i took output , show me authentication page . this is my 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() ; $mech->cookie_jar(HTTP::Cookies->new()) ; $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: Problem in login in web page (JS)
by LanX (Saint) on Sep 28, 2018 at 15:28 UTC | |
by GHMON (Novice) on Sep 28, 2018 at 16:18 UTC | |
by GHMON (Novice) on Sep 28, 2018 at 17:33 UTC | |
by LanX (Saint) on Sep 28, 2018 at 17:37 UTC |