Perl: the Markov chain saw | |
PerlMonks |
Suggest a suitable module?by jdetloff (Acolyte) |
on Jan 17, 2010 at 05:48 UTC ( [id://817822]=perlquestion: print w/replies, xml ) | Need Help?? |
jdetloff has asked for the wisdom of the Perl Monks concerning the following question: So, I've tried a couple modules, and am not having luck completely completing my task with either. I'm trying to make a script that navigates pages, submits data to both html and javascript forms, and returns the html of current page. I tried WWW::Mechanize, but it doesn't support javascript. Then I tried Win32::IE::Mechanize, but discovered something strange - When navigating the site normally clicking a link on the menu would open the requested page on another frame on the browser. Doing so with WWW::Mechanize brought gave you direct access to the document. When I use win32::IE::Mechanize to access the menu frame, and then follow the links, the page just refreshes to the main page. I tried typing url's straight into the browser and got the same results. I have to assume this has something to do with the fact that Win32::IE:Mech is using a browser, instead of making a more direct request to the server? Do you have other ideas of reasons this could happen? Can you think of any ways to make the script access the documents I need? If not, can any of you suggest a web automation tool that can follow links, parse javascripts, return a pages html or url, and fill javascripts and html forms without using a browser? Thanks for any help! ***EDIT*** Oh, sorry, here's some code:
Also here's an example of some javascript from the page I'd like to automate
It adds another drop down menu to a page that allows you to send items to people. Win32::IE::Mechanize could use this page, if it would navigate to it, which it wont. WWW::Mechanize couldnt use it, but it can navigate there.
Back to
Seekers of Perl Wisdom
|
|