May 15, 2022

This release only contains a few dependency updates, such as the ejs package and the cucumber peer dependency version which was causing issues in newer version of NPM.


May 11, 2022

  • Fixed #3127 -- skipped count was incorrect in global reporter results
  • Fixed #3163 -- a circular reference issue occurring sometimes when running tests in parallel
  • Added support to throw an error when passing undefined args in sendKeys command (#3045)
  • Added support to find frame when passing argument as id or name (#3097)
  • Added update to browserstack transport and built-in config (#3148)
  • Added support for marking test scenarios passed/failed and send reason to Browserstack while using Cucumber as a test-runner (#3132)


May 1, 2022

  • Fixed #3033 – global element() was ignoring the global locate strategy
  • Fixed #3138 -- Unhandled rejection while using expect assertions in an async test step


Apr 20, 2022

  • Fixed #3159 - updated ejs to avoid a high severity vulnerability
  • Fixed #3154 - updated peer dependency version of chromedriver


Apr 6, 2022

The Nightwatch 2.1 release adds a few important fixes and several improvements, including upgrade to Selenium 4.1.1. Here's the full list:


describe('sample with relative locators', function () {
  before(browser => browser.navigateTo('https://archive.org/account/login'));

  it('locates password input', function (browser) {
    const passwordElement = locateWith(By.tagName('input')).below(By.css('input[type=email]'));


  • New error stack trace output which parses and highlights the source code line – #3071



  • Set network emulation settings in Chrome/Edge with the .setNetworkConditions() command (#2996)

  offline: false, 
  latency: 5, // Additional latency (ms). 
  download_throughput: 500 * 1024, // Maximal aggregated download throughput. 
  upload_throughput: 500 * 1024 // Maximal aggregated upload throughput. 
  • Automate the input of basic auth credentials with the .registerBasicAuth() command (Chrome/Edge) (#3116)

     .registerBasicAuth('test-username', 'test-password')

Important Fixes

  • Fixed #3079 – unable to clear element in setValue command
  • Fixed #3085 – failing waitFor commands did not failed the test when using the cucumber built-in runner
  • Fixed #3124 - multiple terminal windows opening when running in Chrome on Windows
  • Fixed #3086 - 'RangeError: Maximum call stack size exceeded' when requiring unknown modules


Mar 2, 2022

Fixed an issue occurring when using the Mocha integrated test runner and a test failure was logged in an async testcases.


Mar 1, 2022

  • Fixed #3077 - an issue with page navigate where the url was defined as a function


Feb 28, 2022

This releases adds a few important fixes and improvements. We have made sure that Nightwatch works very well when using the Selenium 4 server in standalone mode and we've added several improvements and fixes for when using Mocha as a test runner.

Users of Selenium Server can now install our own jar download library from NPM and then use it in Nightwatch with no other config necessary. Make sure that chromedriver or geckodriver are also installed from NPM. You can install the Selenium Server with:

npm i @nightwatch/selenium-server


  • Fixed #3054 – default port was not updated for some commands when running in parallel mode
  • Fixed #3052 – Running Nightwatch with Selenium Server 4 in standalone mode
  • Fixed #3055 – Missing error message in case of overwriting an existing command
  • Fixed #3050 – required definition of package.json in current directory
  • Fixed #3075 - an unhandledRejection was occurring when assertion fails while in async mode and if followed by other chained assertions
  • Fixed #3074 - chrome CDP commands loading was throwing an error



Feb 10, 2022

  • Fixed #3031 - unable to start selenium server from nightwatch on windows


Feb 7, 2022


Feb 3, 2022

  • Added several improvements to better support component testing (d8dec007ac5618d772af3a947c7c1dbef068dd89)
  • Added added an improvement for external globals to be persisted properly (af54791bdbf09efc622250658b4bf5e602e9c95b)


Feb 1, 2022

  • Fixed an issue with expect not rejecting the promise correctly and causing an unhandledRejection (a17a7ac04f085895a3a27f9654a4e765973860fd)
  • Added support for expect.element().an() to accept case-insensitive tag names and regular expressions (efb6f109fb6475ef032359b04fb19b49940762ae)


Jan 28, 2022

The public NPM release of Nightwatch 2.0 is here and can be installed directly with:

npm i nightwatch --save-dev

Over the past few weeks we have worked tirelessly to finalise the apis, add a few more examples, and try and smooth over any rough edges.

Important Changes

  • Added a new plugin API; check out the docs for how to create a Nightwatch plugin: nightwatchjs.org/guide/extending-nightwatch/plugin-api.html
  • Added support for using nightwatch.conf.cjs as config file for projects that use ES Modules
  • Upgraded chai expect to version 5 and added support for using regular chai browser.expect() assertions; this doesn't affect the existing expect.element(), expect.elements(), expect.cookie(), expect.title(), and expect.url().
    • Example:
      const infoElement = element('.info');
      .and.to.include('validation code');
      See examples/tests/shadowRootExample.js for the complete example.


  • Added several new assertions:
    • titleEquals
    • titleMatches
    • urlMatches
    • textMatches
    • textEquals
    • domPropertyMatches
    • attributeMatches
    • valueEquals
    • hasClass
    • hasAttribute
    • elementsCount
  • Added new element commands:
    • getFirstElementChild
    • getNextSibling
    • getPreviousSibling
    • hasDescendants
    • isPresent
  • Added new API mouse actions:
    • clickAndHold
    • rightClick
    • releaseMouseButton
  • Added new --devtools CLI flag to open the Chrome Devtools automatically


  • Fixed #2955 - an issue caused by missing the browserName capability
  • Fixed fixed an issue with creating the log folder for writing the webdriver logs (2cff6df2d06f02ef2ed853c89795d3210d2a35c0)


Jan 19, 2022

  • Added more supporting CucumberJS cli options (#2978)
  • Fixed a compatibility issue caused by Selenium (#2999)


Dec 15, 2021

  • Fixed Fixed a regression issue with using execute() command - #2970
  • Updated selenium-webdriver to v4.1 and other depedencies

All releases