Hello,
I have a little project where I need to verify the status of some object that gets installed on the clients computers using JavaScript(not inhouse)
I've managed to get the code running using PERL with the module Win32::IE::Mechanize with the code pasted below, but I cannot get the output of the command because that is returned to the browser as a javascript:alert("xxx").
use Win32::IE::Mechanize;
my $mech = Win32::IE::Mechanize->new( visible => 0 );
$url = 'http://url/to/webpage';
$mech->get( $url );
$mech->success or die $mech->response->status_line;
$mech->get('javascript:Install()');
#DO something to hide the resulting msgBox/javascript:alert
What I am however unable todo, is catch/trap/hide the dialogue returned at the end of the JavaScript which is embedded in the webpage, it calls a function where it writes it to a msgBox. I am not able to hide this and I really want todo this.
I've tried putting the IE::Mechanize agent in quiet mode, ignoring errors etc, but it always comes back to tell me using message boxes.
Is it possible to trap these? (I am not bound to use Internet Explorer/Windows XP, but was the easiest to kick off this project with)
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.