v1.4.2

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

v1.4.1

Sep 6, 2020

  • Fixed #2486 - mocha test runner was unavailable.

v1.4.0

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.

Changelog:

  • 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

v1.3.8

Jul 25, 2020

v1.3.7

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']
},

v1.3.6

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

v1.3.5

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.

v1.3.4

Jan 28, 2020

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

v1.3.3

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

v1.3.2

Dec 6, 2019

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

v1.3.1

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

v1.3.0

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) {
    browser
      .assert.not.elementPresent('.not_present') // previously .assert.elementNotPresent()
      .assert.not.visible('.non_visible'); // previously .assert.hidden()
      .assert.not.urlContains('http://');

    // ...
  }
}

New APIs

Commands:

Assertions:

Expect:

Improvements

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.

Fixes

  • 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

v1.2.4

Sep 20, 2019

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

v1.2.3

Sep 19, 2019

Fixed #2190 - test error/failure stack traces weren't showing correctly

v1.2.2

Sep 1, 2019

  • Added - new configuration settings to for fine tuning the Webdriver server process:
  • status_poll_interval - Interval (in ms) to use between status ping checks when checking if the Webdriver server is up and running
  • max_status_poll_tries - Maximum number of ping status check attempts when checking if the Webdriver server is up and running before returning a timeout error.
  • process_create_timeout - The entire time (in ms) to wait for the Node.js process to be created and running (default is 2 min), including spawning the child process and checking the status

More details

All releases