Is there a Node.js equivalent of Perl's WWW::Mechanize?

I'm searching a module for Node which would be similar to WWW::Mechanize for Perl. Or even better to WWW::Mechanize::Firefox.

  • The main functionality would be to find and submit form by name, class or id.
  • The ability to handle cookies would be great
  • and the ability to handle Javascript would be perfect.

If anyone had an idea of something similar, or in which direction I could search, that would really be appreciated.

Thank you and sorry for my English!

What you're looking for is a scriptable browser. In decreasing order of popularity, the options are:

  • PhantomJS - head & shoulders above all. A headless WebKit.
  • Zombie - more lightweight
  • slimerjs - like PhantomJS but runs Gecko
  • chimera - like PhantomJS but doesn't need to run an external process
  • mechanize-js, which lacks documentation and has far less traction than any of the above alternatives

The closest tool I have found for now is zombie.

Apparently it is not exactly ready for production (and may never be) as it is a testing tool. Nevertheless it seems that it is the closest match for the functionality needed (and it supports JS!)

Try mechanize-js - the name says it all...