Skip to content

Running tests in PhantomJS

James Ford edited this page Jun 13, 2016 · 5 revisions

Running tests in PhantomJS is possible with the aid of GhostDriver.

Getting started

  1. Download the latest stable PhantomJS.

  2. Configure the path; set the location to the binary in desiredCapabilities in nightwatch.json, such as:

"desiredCapabilities" : {
  "browserName" : "phantomjs",
  "javascriptEnabled" : true,
  "acceptSslCerts" : true,
  "phantomjs.binary.path" : "/path/to/phantomjs",
  "phantomjs.cli.args" : ["--version"]
}

More Info

For more info about GhostDriver and its specific capabilities, please refer to the official GhostDriver Project.