Nightmare: High level wrapper for Phantomjs that provides a streamlined API

Nightmare logo

Raw PhantomJS

phantom.create(function (ph) {
  ph.createPage(function (page) {'', function (status) {
      page.evaluate(function () {
        var el =
        el.value = 'github nightmare';
      }, function (result) {
        page.evaluate(function () {
          var el = document.querySelector('.searchsubmit');
          var event = document.createEvent('MouseEvent');
          event.initEvent('click', true, false);
        }, function (result) {

With Nightmare

new Nightmare()
  .type('input[title="Search"]', 'github nightmare')

Nightwatch.js: Automated browser testing using tests written in Node.js running against a Selenium server

Nightwatch.js logo

From the Nightwatch.js website:

Nightwatch.js is an easy to use Node.js based End-to-End (E2E) testing solution for browser based apps and websites.

It uses the powerful Selenium WebDriver API to perform commands and assertions on DOM elements.


  • Simple but powerful syntax which enables you to write tests very quickly, using
    only Javascript and CSS selectors. No need to initialize other objects and
    classes, you only need to write the test specs.

  • Built-in command-line test runner which enables you to run the tests either
    altogether, by group or single.

  • Manages the Selenium server automatically; can be disabled if Selenium runs on
    another machine.

  • Continous Integration support: JUnit XML reporting is built-in so you can
    integrate your tests in your build process with systems suchs as Hudson or

  • Use CSS selectors or Xpath to locate and verify elements on the page or execute

  • Easy to extend if you need to implement your own commands specific to your