PhantomJS is a headless (GUI-less) WebKit with a JavaScript API. It has native support for various web standards: DOM handling, CSS selector, JSON, Canvas, and SVG.

PhantomJS is a headless (GUI-less) WebKit with a JavaScript API. It has native support for various web standards: dom handling, css selector, json, canvas, and svg.

PhantomJS is a solution for headless testing of web-based applications, site scraping, page capture, svg renderer, pdf converter and many other use cases. Since it isn't actually a browser, it is very fast.

PhantomJS was released January 23, 2011 by Ariya Hidayat after several years in development.

Related projects

PhantomJS has its own standalone execution environment, but it can be used through the wire protocol in various languages that provide bindings for .

CasperJS is another standalone framework that is built on top of PhantomJS (and runs in PhantomJS).

PhantomJS needs some kind of bridge to be used directly from within a node.js script. Popular bridges include phantom, node-phantom, nightmare (nightmare version <1.8 used PhantomJS, now it's Electron), Horseman, navit, phridge, node-phantom-simple, jquery.go.js, SpookyJS (wrapper around CasperJS, which is a wrapper around PhantomJS), x-ray (use in addition x-ray). Questions concerning those bridges should be tagged with node.js as well as phantomjs.

Documentation