trahulprajapati has asked for the wisdom of the Perl Monks concerning the following question:
Hello Everyone
I'm facing an issue while clicking the button after login to the webpage
What I want to do is , First login to the webpage then click the OK button. I'm using WWW::Scripter(plugin javascript) as login page is using javascript while loading.
Here is the code that I have tried
use strict; use warnings; use WWW::Scripter; my $username = "abc"; my $password = "abc\@123"; my $w= WWW::Scripter->new( cookie_jar => { autosave => 1} ); $w->use_plugin('JavaScript'); $w->get('abc.xyz.com'); $w->submit_form( with_fields => { username => $username, password => $ +password }); print $w->title(); #Till here it is working, I'm able to login ############## Clicking OK button ################ $w->click(name=>'successOK'); print $w->title(); #it is giving me that no clickable button with name successOK
Here is OK button code
<div id="srv_successok"><input type="button" name="successOK" value=" + OK " onClick="redir();"></div>
Please suggest how can I resolve it
Thank you
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: No Clickable button with name.... in WWW::Scripter
by Corion (Patriarch) on Jun 28, 2017 at 19:41 UTC | |
by trahulprajapati (Novice) on Jun 29, 2017 at 10:05 UTC | |
by Corion (Patriarch) on Jun 29, 2017 at 10:10 UTC | |
by trahulprajapati (Novice) on Jun 30, 2017 at 10:48 UTC | |
by Corion (Patriarch) on Jun 30, 2017 at 10:51 UTC | |
by marto (Cardinal) on Jun 30, 2017 at 11:00 UTC |