in reply to Re^7: How do I click Javascript button with Win32::IE::Mechanize
in thread How do I click Javascript button with Win32::IE::Mechanize
I checked it with other options#!/usr/bin/perl use strict; use warnings; use Win32::IE::Mechanize; my $ie = Win32::IE::Mechanize->new( visible => 1 ); my $url ='http://url/go'; $ie->get( $url ); $ie->follow_link (text =>"subForm('UA_Signin','signOff')")|| die"can't + find text $!"; # $ie->find_link (url=>"javascript:subForm('UA_Signin','signOff')");
One thing i want to let you know while hitting on signoff button (or reference) manually ,page moves to login page but the url (at address bar)does not get changed. Hope it will help you to find out my solution. Thanks#$ie->find_link (number=>2); # $ie->find_image(image =>"ua/images/button-signoff.gif")|| die"can't + find image$!"; # $ie->find_image(alt =>" ")|| die"can't find image$!";
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^9: How do I click Javascript button with Win32::IE::Mechanize
by rshrivaQ (Initiate) on Dec 21, 2007 at 12:56 UTC | |
| [reply] |
by marto (Cardinal) on Dec 21, 2007 at 13:39 UTC | |
As I am sure you have noticed, you get notified when someone replies to your post. Since you replied to yourself here, I did not get informed. I have been busy with my day job so have no had a chance to get back to you, however it is considered polite to wait until someone replies in their own time. You did not provide us with the JavaScript code in question. Please note the dummy JavaScript function I have written into the HTML you provided: Now, when I run this code, I see the alert window as expected. Unless the JavaScript function subForm exists in the JavaScript file you include, nothing will happen when the link is followed, as there is no function in the HTML you have provided. Feel free to add the required error checking. Hope this helps Martin | [reply] [d/l] [select] |
by rshrivaQ (Initiate) on Dec 27, 2007 at 13:34 UTC | |
and my script is script is able to load the page and passing the inputs but its not hitting the SIGN ON button. Thanks | [reply] [d/l] [select] |
by marto (Cardinal) on Dec 27, 2007 at 13:50 UTC | |