Hi all ,
I have written a script to automate a web app using win32::IEautomation, i am able to perform most of the operations but i am not able to automatically click the javascript alert dialog box that appears, after clicking a button on the webpage.
The thing is once submit button is clicked the code doesn,t execute further and is stuck, because of which i am not able to go further.
Another thing since most of the customers of app are using IE i need to perform this in IE itself.
Below is the code that i am using for the problem which is not working.
use Win32::IEAutomation;
use Win32::IEAutomation::WinClicker;
my $clicker1 =Win32::IEAutomation::WinClicker->new(warnings => 1);
#-----------------------------------------------------------
code for filling other input fields of form.
#------------------------------------------------------------
my $title="Message from webpage";
$ie->getButton('caption:', "Submit",1)->Click;
$clicker1->alert_ok($title);
alert_ok() is the subroutine that i have added in winclicker module to click on alert window it is same as other subroutines except the subroutine name.
The main issue i am facing is i am not able to goto next line of code once the button is clicked.
After that the code gets stuck.
Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
Read Where should I post X? if you're not absolutely sure you're posting in the right place.
Please read these before you post! —
Posts may use any of the Perl Monks Approved HTML tags:
- a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, details, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, summary, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
| |
For: |
|
Use: |
| & | | & |
| < | | < |
| > | | > |
| [ | | [ |
| ] | | ] |
Link using PerlMonks shortcuts! What shortcuts can I use for linking?
See Writeup Formatting Tips and other pages linked from there for more info.