Is Node.js the equivalent of Perl WWW :: Mechanize?

I am looking for a module for a node that would look like WWW :: Mechanize for Perl. Or better yet, WWW :: Mechanize :: Firefox .

  • The main functionality will be to search and submit the form by name, class or identifier.
  • The ability to handle cookies would be great
  • and the ability to handle Javascript would be ideal.

If someone had an idea about something similar or in what direction I could look, it would be very useful.

+7
source share
4 answers

What you are looking for is a browser without scripts. The following options are available in descending order of popularity:

  • Google Puppeteer - "A site library that provides a high-level API for managing Chrome or Chromium"
  • Zombies are lighter; "Insanely fast, full head testing without using Node.js"
  • slimerjs - scripting Firefox. No commits since March 2018.
  • mechanize-js , which lacks documentation and far less traction than any of the above alternatives.

Abandoned projects

+12
source

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

+1
source

The closest tool I found now is zombie .

Apparently, he is not quite ready for production (and probably never will be), since he is a testing tool. Nevertheless, it seems that this is the closest match for the required functionality (and it supports JS!)

0
source

you can embed a perl script in node.js use:

npm install exec_perl

see: https://github.com/tlqtangok/exec_perl

0
source

All Articles