Beefy Boxes and Bandwidth Generously Provided by pair Networks
Just another Perl shrine
 
PerlMonks  

comment on

( [id://3333]=superdoc: print w/replies, xml ) Need Help??
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":



  • Are you posting in the right place? Check out Where do I post X? to know for sure.
  • Posts may use any of the Perl Monks Approved HTML tags. Currently these include the following:
    <code> <a> <b> <big> <blockquote> <br /> <dd> <dl> <dt> <em> <font> <h1> <h2> <h3> <h4> <h5> <h6> <hr /> <i> <li> <nbsp> <ol> <p> <small> <strike> <strong> <sub> <sup> <table> <td> <th> <tr> <tt> <u> <ul>
  • Snippets of code should be wrapped in <code> tags not <pre> tags. In fact, <pre> tags should generally be avoided. If they must be used, extreme care should be taken to ensure that their contents do not have long lines (<70 chars), in order to prevent horizontal scrolling (and possible janitor intervention).
  • Want more info? How to link or How to display code and escape characters are good places to start.
Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others chilling in the Monastery: (4)
As of 2024-03-29 00:51 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found