v2.5.1

Nov 16, 2022

  • Fixed #3475: an issue with propagating the exit code properly when using the programmatic api
  • Other – upgrade Selenium to 4.6.1

v2.5.0

Nov 11, 2022

Improvements

  • Added support for mobile web integration in Nightwatch using the new @nightwatch/mobile-helper library
  • Added support for writing globals, page objects, and commands in ESM format c40f86

Fixes

  • Fixed #3440 – socket hang up error when report_network_errors is enabled
  • Fixed #3465 – an issue with using testSuite retries with enable_fail_fast enabled
  • Fixed #3470 – issue with Actions API when passing async callback to browser.perform()

Other

  • Upgraded selenium-webdriver to 4.5.0

v2.4.2

Nov 3, 2022

  • Added an improvement for error messages shown when running React component tests
  • Fixed --open cli argument wasn't working properly #3459
  • Added support for launching the local web server for component testing from the android emulator #3460
  • Fixed an issue with displaying the http output in the HTML reporter when running tests in parallel 3462

v2.4.1

Oct 20, 2022

  • Fixed an issue resulting from await-ing test hooks properly in some cases 4f6c31

v2.4.0

Oct 19, 2022

New features

The v2.4.0 release brings improved support for Component Testing, which includes:

  • @nightwatch/storybook
    • new official plugin which integrates Nightwatch with Storybook
    • adds ability to run component stories directly from Nightwatch, including:
      • interaction tests using the play() function
      • run test hooks in the Nightwatch context
      • run test() function in the Nightwatch context
      • run configured accessibility rules automatically using the axe-core suite of commands
  • vite-plugin-nightwatch
    • upgraded plugin to use Vite 3
  • @nightwatch/vue
    • new dedicated Vue.js component testing plugin which includes Vite 3 and manages its own Vite dev server
  • @nightwatch/react

New CLI flags

  • --serial to run tests in serial mode (disable parallelism)
  • --workers to specify the number of test workers to be used when running tests in parallel
  • --reuse-browser to reuse the browser session if running in serial mode
  • --debug – automatically pause the test execution after mounting the component and open the Nightwatch debug REPL interface.
  • --story - allows to specify which story to run from the current file (when using Storybook or JSX written in component story format)
  • --preview - used to preview a component story/test; automatically pause the test execution after mounting the component.

Other Improvements

  • Added support to use --devtools CLI flag in Edge and Safari to open the Dev Tools automatically
  • Added support to enable running tests in parallel by default if not set PR #3364
  • Added support for using nightwatch.conf.ts as config file and a few other improvements for running typescript tests PR #3316

Fixes

  • Fixed #3404 an issue with the moveTo command
  • Fixed #3256 .verify assertions do not resolve when called from within the .perform() command

v2.3.9

Sep 24, 2022

Minor update for the axe-nightwatch-verbose dependency.

v2.3.8

Sep 23, 2022

  • Fixed #3396 showing version using the --version cli flag
  • Fixed #3336 an issue with using browser.resizeWindow()

v2.3.7

Sep 16, 2022

Fixed #3355 – updating the build name using client.updateCapabilities did not work

v2.3.6

Sep 15, 2022

v2.3.5

Sep 14, 2022

  • Added new CLI flag `--report-filename to specify the report file name for the JSON reporter d73a6f
  • Fixed #3361 -- expect.cookie always returning undefined value
  • Fixed an issue where the error thrown for using incorrect arguments for element commands was not reported if using async/await testcase e9e38c
  • Fixed #3372 -- chaining custom commands from page objects when imported through plugins interface
  • Added analytics feature to collect anonymous user metrics (opt in only) PR #3141

v2.3.4

Sep 2, 2022

  • Fixed #3284 – beforeEach hook was executed even it() / test() is marked as skipped
  • Fixed #3352 – a TypeError was thrown if a custom command is throwing an error

v2.3.3

Aug 19, 2022

Improvements

  • Added support for using native mobile drivers (#3335)
  • Added new cli flag --list-files (#3246)
  • Added support to retain the html report between test runs (#3309)

Fixes

  • Fixed #3304 - added buildname to settings when running on Browserstack
  • Fixed #3301 - awaited asserts used inside custom commands were hanging the test run
  • Fixed #3257 - expect.elements(..).count should be 0 if element not found

v2.3.0

Jul 20, 2022

New feature

  • Added pause and debug capabilities - https://github.com/nightwatchjs/nightwatch/issues/3243

    Pause mode

    Add a pause() command to pause your tests indefinitely. In pause mode, you can check the state of your browser or use DevTools to debug. You can also see step-by-step execution from the paused state where the test automatically pauses at the next step.

    Note: The current pause command usage stays as is. You can pass the duration of the pause and the test will pause only for that duration on the mentioned devices.

    Debug mode

    Add a debug() command to pause your test at that step. The debug mode also allows you to check the state of the browser and use DevTools. Furthermore, it offers you an interface to try out nightwatch commands and assertions while your test is paused.

Improvements & Fixes

Release Walkthrough

Nightwatch release walkthough Nightwatch release walkthough

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)

All releases