http://qs321.pair.com?node_id=547094


in reply to web mechanize issue with javascript...

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.
  • Comment on Re: web mechanize issue with javascript...