PhantomJS

Full web stack
No browser required

PhantomJS is a headless WebKit scriptable with a JavaScript API. It has fast and native support for various web standards: DOM handling, CSS selector, JSON, Canvas, and SVG.

Download v1.9 Get started

Simple Javascript example

console.log('Loading a web page');
var page = require('webpage').create();
var url = 'http://www.phantomjs.org/';
page.open(url, function (status) {
  //Page is loaded!
  phantom.exit();
});
      

Community:

PhantomJS is an optimal solution for

Headless Website Testing

Run functional tests with frameworks such as Jasmine, QUnit, Mocha, Capybara, WebDriver, and many others. Learn more

Screen Capture

Programmatically capture web contents, including SVG and Canvas. Create web site screenshots with thumbnail preview. Learn more

Page Automation

Access and manipulate webpages with the standard DOM API, or with usual libraries like jQuery.
Learn more

Network Monitoring

Monitor page loading and export as standard HAR files. Automate performance analysis using YSlow and Jenkins. Learn more

PhantomJS is used in the test workflow of various open-source projects:
Bootstrap, CodeMirror, Ember.js, jQuery Mobile, Less.js, Modernizr, YUI3, and many more.

Fork PhantomJS on GitHub