0

I need to navigate websites and perform various actions like logging in, browse to a specific page, fill out forms, extract certain text and corresponding js in respective files automatically.

For an example, I have to logged in one site and then access controls in navigated pages etc. Some controls are controlled by javascript too,

By using WWW::Mechanize module I am unable to access javascript in a navigated page.

Workflow:

Login page->Navigated_html_page->event->JsFunction->Loadothercontrols->Upload File->Submit action.

Can anyone suggest solutions for this?

Madhan
  • 1,291
  • 3
  • 21
  • 34
  • 2
    Topic was discussed already very often. [Search for mechanize javascript](http://stackoverflow.com/search?q=mechanize+javascript), relevant: And these are just from the first result page. – daxim May 31 '11 at 11:26

2 Answers2

4

Either reverse engineer the JS and do what it does in your Perl, or use something like WWW::Mechanize::Firefox

Quentin
  • 914,110
  • 126
  • 1,211
  • 1,335
2

You can try WWW::Scripter with the JavaScript or Ajax plugin.

mscha
  • 6,509
  • 3
  • 24
  • 40