Hey perlknight,

I had a similar problem recently. I had to deal with javascript on a page and I wanted to use WWW::Mechanize.

Checking the monastery gave me some help, but didn't give me a specific answer, just pointers towards a long and winding road.

Browsing though CPAN I stumbled upon Win32::IEAutomation, web application automation using Internet Explorer.

Now I don't know if your code should run on windows or an other platform. Since Win32::IEAutomation uses Win32::OLE to create automation object for IE, it's only usefull on windows. But I had a script whipped up in a couple of minutes.

from the docs:
It drives internet explorer using its DOM properties and methods. The module allows user to interact with web page controls like links, buttons, radios, checkbox, text fields etc. It also supports frames, popup window and interaction with javascript dialogs like security alert, confirmation, warning dialog etc.

There's no ppm for it at activestate, but if you download it, untar it and just put the folder in your Win32 folder in your perl directory it will function perfectly.

Good luck,


teabag
Blessed is the end user who expects nothing, for he/she will not be disappointed.

In reply to Re: web mechanize issue with javascript... by teabag
in thread web mechanize issue with javascript... by perlknight

Title:
Use:  <p> text here (a paragraph) </p>
and:  <code> code here </code>
to format your post, it's "PerlMonks-approved HTML":



  • 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:
    & &amp;
    < &lt;
    > &gt;
    [ &#91;
    ] &#93;
  • Link using PerlMonks shortcuts! What shortcuts can I use for linking?
  • See Writeup Formatting Tips and other pages linked from there for more info.