v2.3.0

Jul 20, 2022

New feature

Improvements & Fixes

v2.2.3

Jul 15, 2022

  • Fixed #3183 – setting chromeOptions in older format didn't work
  • Fixed #3130 – an issue with setting the driver service port number in case of parallel runs with test workers
  • Fixed #3096 – an issue with session request redirection when using SauceLabs
  • Fixed #3264 – HTML reporter raw http logs were failing to escape html
  • Added support for .mockNetworkResponse() to accept relative urls (to launch_url setting)
  • Other – Upgraded selenium-webdriver version to 4.3.1 (#3278)

v2.2.2

Jun 21, 2022

Important fixes

  • Fixed #2975 – expect.element().to.not.be.present throws error when the element is not present
  • Fixed – an issue with persisting http data for the HTML reporter

New features

The new Nightwatch init CLI tool is now available to use in order to kick-start a new Nightwatch test project in under 60 seconds.

Simply run:

npm init nightwatch

Nightwatch CLI tool preview

Release notes for create-nightwatch: https://github.com/nightwatchjs/create-nightwatch/releases/tag/v1.0.0

Other

  • Downgraded selenium to 4.1.1 to mitigate a chromedriver startup issue

v2.2.1

Jun 14, 2022

The latest release introduces a new built-in HTML reporter and several new API commands based on the Chrome Devtools Protocol for mocking network responses, capturing logs, and more.

Improvements

  • Added new integrated HTML reporter with test status, assertion logs & raw HTTP logs - #3223; image Read more

Other

  • Added support to find frame when passing argument as id or name - #3205
  • Upgraded selenium-webdriver to v4.2.0 - #3215

v2.1.8

Jun 8, 2022

  • Added - platform methods in case of Appium client (#3166)
  • Fixed - an issue with generating XML output for when running tests in parallel (#3163)

v2.1.7

May 18, 2022

  • Upgraded the global package to fix an issue on windows

v2.1.6

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.

v2.1.5

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)

v2.1.4

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

v2.1.3

Apr 20, 2022

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

v2.1.0

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:

Improvements

  • Support for working with Selenium relative locators

    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]'));
    
      browser
        .waitForElementVisible(passwordElement)
        .expect.element(passwordElement).to.be.an('input');
    
      browser.expect.element(passwordElement).attribute('type').equal('password');
    });
    });
    


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

    image

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

    browser.setNetworkConditions({ 
    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)

    browser
       .registerBasicAuth('test-username', 'test-password')
       .navigateTo('http://browserspy.dk/password-ok.php');
    

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

v2.0.10

Mar 2, 2022

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

v2.0.9

Mar 1, 2022

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

v2.0.8

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

Fixes

  • 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

Improvements

v2.0.7

Feb 10, 2022

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

All releases