crazy5655 has asked for the wisdom of the Perl Monks concerning the following question:
Hi Monks,
I have a problem to login a wbsite which calls javascript, I read docs where they suggested to use WWW::Scripter. But no luck. Look into my code and source of website. and suggest me the best way to resolve this issue.Here my submit button calls a Jscript function called submitLoginForm; Submit :my $mech = WWW::Scripter->new(); $mech->agent('Mozilla/5.0 (Windows; U; Windows NT 5.1; en; rv:1.9.2.3) + Gecko/201 00401'); $mech->use_plugin(JavaScript => engine => 'JE', ); $mech->get("https://www.mywesite.com/plp/login.do"); print $mech->content; $mech->submit_form( with_fields => { userId => 'myId', pass => 'myPass +' } );
Here the function details--<td class="submitButton" id="SignInButton"> <a href="#" onclick='return submit +LoginForm("ACTION_PIN_LOGIN","myLogin");'>
help me to resolve this issuefunction submitLoginForm(val,source) { if(val == "ACTION_PIN_LOGIN") removeSignInButton(); document.forms['LoginForm'].action.value = val; document.forms['LoginForm'].source.value = source; document.forms['LoginForm'].submit(); return false; }
Thanks in Advance
|
---|
Replies are listed 'Best First'. | |
---|---|
Re: Login Website
by thomas895 (Deacon) on Apr 20, 2012 at 13:24 UTC | |
by crazy5655 (Initiate) on Apr 23, 2012 at 05:59 UTC | |
Re: Login Website
by Riales (Hermit) on Apr 20, 2012 at 17:36 UTC | |
by crazy5655 (Initiate) on Apr 23, 2012 at 10:20 UTC | |
by Riales (Hermit) on Apr 23, 2012 at 16:48 UTC |
Back to
Seekers of Perl Wisdom