views:

106

answers:

2

Can Mechanize make Javascript calls?

This would be handy to negotiate AJAX when screen-scraping...

A: 

No, it can't. If you need to interact with javascript, you should look at other solutions like watir.

sepp2k
Hmmm, Watir is nice, but creates a few more problems for me.
trnsfrmr
+1  A: 

For dealing with JavaScript you can use a browser plugin like Chickenfoot or iMacros.

However often I find that the fastest approach for dealing with AJAX is using FireBug to track the URL requests and then calling these URLs directly.

Plumo
We use iMacros with good success from Perl: http://wiki.imacros.net/Perl
RegExGuru