PhantomJS allows you to run Javascript on web pages without a browser much like Node.js

It is a good tool for automating tasks related to web pages and browsers, such as unit testing.

Phantom is specialized for running Javascript on actual HTML code, much like would be done inside a browser, but it also offers many interfaces for operations not possible from Javascript in browsers, such as File IO, much like Node.js.

Why Phantom is not a Node.js module: The following module adds Node bindings to Phantom:

comments powered by Disqus