Oct 20, 2020

Nightwatch v1.5 introduces support for using third-party automation libraries directly into Nightwatch tests, thus providing significantly more flexibility in writing custom commands/assertions and also the test itself. This functionality also aims to eliminate some of the burden in choosing between various frameworks, by providing the possibility to combine the functionality offered by other libraries, such as selenium-webdriver or WebdriverIO, with Nightwatch.

Other fixes and improvements:

  • Fixed #2245 - test_settings is undefined in global before hook
  • Added --parallel cli flag for easier running of tests with test workers – 5cfc278
  • Added a config setting to display timestamps in iso format – 1dad022


Sep 18, 2020

  • Fixed #2489 - api commands throwing TypeError when called inside page section custom commands
  • Fixed #1969 - element selectors from page sections not working when used in custom commands


Sep 11, 2020

  • Fixed #2488 - 'element not found' errors thrown by JsonWire protocol for /element requests were not ignored
  • Fixed an issue where the WebElement ID is not retrieved correctly when using chrome with selenium server and jsonwire transport


Sep 6, 2020

  • Fixed #2486 - mocha test runner was unavailable.


Sep 4, 2020

This version significantly improves the network stability and performance of the test runner, by improving the underlying http retry mechanism and error detection and reporting of API commands – a particularly important update for when using cloud testing services.

Additionally, we have added better support for writing advanced custom commands to make it easier to extend Nightwatch, and improved support for using Nightwatch programmatically. See writing custom commands docs page.

The Developer Guide docs also have been updated.


  • Added improved http request retry mechanism and better error reporting for api commands – a04162c6da76ea3576c6739cde61ae3b36940a63
  • Added enhancements to assist in writing of custom commands – c977b164508eda3bd145d4d594749426785a7c8c
  • Added abortOnElementLocateError global property to control if the testcase in progress should continue in the event of an element locate error (as a result of a click, getText, etc. command) – #2459
  • Fixed an issue with merging the config settings when passed programmatically – #2483
  • Fixed an issue where transport was set incorrectly for Chrome when using chromeOptions.w3c:true – d56a9db9e0a5a764bd96232ac859a40b7f69bf11
  • Fixed an issue where the locator strategy was not taken into account when specifying first argument in a waitFor* command – #2446
  • Fixed #2458 - implemented proper handling of 5xx server errors sometimes encountered during element commands, usually when using cloud testing services or selenium grid


Jul 25, 2020


Jul 22, 2020

Added new setting test_workers.node_options to enable passing node options to individual test worker processes. Usage:

  • This will pass all of process.execArgv:
test_workers: {
    enabled: true,
    // automatically compute the number of workers based on CPU cores
    workers: 'auto',
    // pass node arguments to individual workers (all of the process.execArgv)
    node_options: 'inherit',
  • This will pass only the specified cli options:
test_workers: {
    enabled: true,
    workers: 'auto',
    // selectively pass node arguments to individual worker processes
    node_options: ['--inspect']


May 30, 2020

  • Fixed #2417 - --filter argument was ignored if both --filter and --skiptags are set
  • Fixed - an issue occurring when using --filter argument and an empty src_folders setting - b2c2daa363c77f2e99c718e1cabdcd87c8f2c13e
  • Added - improved jUnit reporting for assertions in before/after test hooks - 0cc36278b07f3d1df95d5e5e27c2a8a9109e61c4
  • Added - stripping of ansi control characters in jUnit xml reports and improved currentTest api property - 0cc36278b07f3d1df95d5e5e27c2a8a9109e61c4
  • Fixed - an issue with running tests using the describe interface more than once in the same test run - cb1221de53e8e14dd88b409dd4a8d23ff69ecac1
  • Fixed - a problem with using the global --timeout argument in some cases - 1b3abcdf6474e8d56ba4c9900819b134e0dcf7bc
  • Fixed - an issue where a failed assertion inside the after test hook would have blocked the test run - 1e1103282b7657a627fdb123453754e243940b24
  • Fixed - displaying the correct error message in case of using an unknown api assertion (e.g. due to a typo) - abaaaf82504b1aaded2fefa177fd3c9ca5b6f6f4
  • Fixed - remove the isVisible workaround for Safari lower than v12 - c8e34b2f8e983e68c1cda89fb636c5b0f96c41e1


May 3, 2020

  • Fixed #2365 - Removed deprecated optimist package and updated implementation of cli help display;
  • Fixed an issue with specifying a non-default port to geckodriver and chromedriver;
  • Fixed a potential issue when not specifying a callback to some element protocol actions;
  • Fixed #2375 - remove incorrect cli args from safaridriver.


Jan 28, 2020

  • Fixed #2294: ES6 async/awaits does not work with browser.elements()


Jan 26, 2020

  • Fixed #2286 - es6 await commands not working on page objects
  • Fixed #2269 - negate (".not") assertions not working with page objects
  • Added - cli option for showing timestamp in logs - #2268
  • Added error messages in JUnit xml report - #2131


Dec 6, 2019

  • Fixed #2263 - custom commands when called on sections without element ids
  • Fixed #2262 - keys() command stopped working due to a regression


Nov 23, 2019

  • Fixed #2255 - callback not being called when errors occurred during an element command;
  • Added improvements for the auto-generated nightwatch.conf.js file


Nov 22, 2019

New features

BDD describe Interface

Added BDD describe interface for writing tests. No further configuration is necessary and both exports and bdd interfaces can be mixed together (though not in the same file). More details

assert.not Assertions

You can use .not assertions for every existing and custom assertion. Custom assertions will require to be updated to the new interface in order to make use of .not. Refer to the Custom assertions docs for details.

module.exports = {
  demoTest(browser) {
      .assert.not.elementPresent('.not_present') // previously .assert.elementNotPresent()
      .assert.not.visible('.non_visible'); // previously .assert.hidden()

    // ...

New APIs





New CLI options:

  • --headless - Launch the browser (Chrome or Firefox) in headless mode.
  • --timeout - Set the global timeout for assertion retries before an assertion fails. The various timeout values are defined in the Globals section.

More details

nightwatch Test Runner

  • Auto-generated configuration: if no existing config file is found in the current folder, Nightwatch will generate a nightwatch.conf.js config file, based on the operation system and existing driver packages. More details
  • Added support for http keepAlive which should be enabled when using remote testing services. See Configuration for details.
  • Added several improvements for running tests against cloud testing provider Browserstack; see also an example configuration for using Browserstack.


  • Fixed #2219 - an issue with locating elements from page object sections using non @-based element identifiers
  • Fixed getElementSize and getLocation commands for w3c webdriver clients - #fd10c9b


Sep 20, 2019

  • Added the module path of the testsuite in the test results object - #2207

All releases