@beatfactor beatfactor released this Aug 15, 2018

Assets 2
  • Fixed an issue with incorrectly passing the context to callbacks of elements protocol actions
  • Fixed #1862 - an issue with saving junit xml reports on windows
  • Added argument validation for element protocol actions which receive a web element ID
  • Fixed #1858 - using --reporter option throws error
  • Fixed #1835 - issue with loading non js custom assertion files

@beatfactor beatfactor released this Jul 23, 2018 · 8 commits to master since this release

Assets 2
  • Fixed #1808 - loading custom commands on page objects.

@beatfactor beatfactor released this Jul 22, 2018 · 13 commits to master since this release

Assets 2
  • Fixed an issue which was causing problems with starting chromedriver
  • Fixed some webdriver compatibility issues (setvalue and switchWindow)
  • Fixed a regression issue regarding the log_screenshot_data option when taking screenshots
  • Added support for managing the safaridriver service.

@beatfactor beatfactor released this May 7, 2018 · 28 commits to master since this release

Assets 2
  • Fixed #1786 - an issue with the transport protocol when connecting to an external Selenium service

@beatfactor beatfactor released this May 6, 2018 · 30 commits to master since this release

Assets 2
  • Fixed #1779 - unable to set output folder
  • Fixed #1793 - optimist module missing

@beatfactor beatfactor released this Apr 27, 2018 · 36 commits to master since this release

Assets 2
  • Slightly improved error handling and fixed a problem with passing the correct context to callbacks.
Apr 24, 2018
Apr 24, 2018

@beatfactor beatfactor released this Apr 24, 2018 · 45 commits to master since this release

Assets 2

A significant update from previous 0.x versions featuring a complete rewrite of the entire codebase and also including some new features. The main focus has been on improving the underlying architecture, therefore this release includes mostly fixes and improvements, but also a few brand new features. Please see the upgrade guide for details on breaking changes and how to migrate from v0.9.

WebDriver Integration

  • ChromeDriver and GeckoDriver Integration - Nightwatch now manages ChromeDriver and GeckoDriver processes directly, similarly to the Selenium Server is managed. The webdriver configuration settings may be used to control this behaviour, e.g.:
"webdriver" : {
  "start_process": true,
  "server_path": "./path/to/chromedriver"

For a complete list of available config settings (until the docs get updated on the website), refer to the default settings.

It's important to note that, while the Selenium Server was required with older Nightwatch versions (v0.9 and prior) and continues to work with v1.0, starting with version 1.0 Selenium is completely optional and only required in a Selenium Grid environment.

Page Objects Improvements

  • object-based element selectors optional, object-based selector values in commands - see #1156
  • index property to element objects - allows the option of specifying an index property in element objects for pages or element commands - see #1115

New Mocha Implementation

For cases when Mocha is used as a test runner, a new adapter has been introduced in place of the mocha-nightwatch package. This is however in experimental stages.

New programatic API

There has been some demand for a proper programatic API, through which Nightwatch may be used without a configuration file. Nightwatch exports now a new runTests() public method which may be used for such purposes.

The settings object inherits from the default settings mentioned above.

const Nightwatch = require('nightwatch');

Nightwatch.runTests('/path/to/tests_folder', {
  // various settings
}).then(function() {
  // Tests finished
}).catch(function(err) {
  // An error occurred

The programatic API is being used extensively in the unit/integration tests, e.g. in test/src/runner/testRunTestsuite.js

Other Fixes and Improvements:

  • concurrency - improved support for running tests in parallel using test workers and test environements;
  • test hooks - fixed a number of bugs related to test and global hooks;
  • retries - better support for test case and test suite retries;
  • error handling - improved error handling support which should help with identifying problems inside tests.
  • filters - improved support for using filter and exclude properties.

This release also paves the way for our own upcoming, Nightwatch dedicated, cloud testing service -

Known Issues and Limitations

  • running in parallel (e.g. with test workers) is not yet available when using GeckoDriver directly, however it is OK for when using Selenium and GeckoDriver combined;
  • socket hang up error while running ChromeDriver, managed by Nightwatch - occasionally ChromeDriver will abort the connection with this error and the process might be left hanging. A possible workaround might be specifying the --no-sandbox cli argument to ChromeDriver, like so:
"desiredCapabilities" : {
  "browserName" : "chrome",
  "chromeOptions": {
    "args" : ["--no-sandbox"]
  • GeckoDriver is not yet feature complete regarding WebDriver API support and thus may not be on par with ChromeDriver regarding commands support;
  • Other driver implementations, such as Safari or Edge, have not yet been properly tested, nor integration with cloud testing providers, like BrowserStack or SauceLabs.
Apr 24, 2018