How do I use Mechanize to process JavaScript?

If you need to handle pages with Javascript, try WATIR or Selenium – those drive a real web browser, and can thus handle any Javascript. WATIR Classic requires either IE or Firefox with a certain extension installed, and you will see the pages flash on the screen as it works.

Your other option would be understanding what the Javascript on the offending page does and bypassing it manually, but that seems onerous.

Leave a Comment