github nightwatchjs/nightwatch v1.7.3

latest releases: v3.9.0, v3.8.1, v3.8.0...
3 years ago

Nightwatch v1.7

New features

Nightwatch v1.7.0 introduces a few major new features and improvements for the test runner and also regarding the test syntax, such as:

Fluent API

It is now possible to use ES6 async/await syntax and also chain api commands together in the same test case; e.g.:

it('find elements example', async function(browser) {
    const resultElements = await browser
      .url('https://nightwatchjs.org')
      .findElements('.features-container li');

    resultElements.forEach(item => console.log('Element Id:', item.getId()))
});

Integrated support for Microsoft Edge

You can now use the newer (Chromium-based) Microsoft Edge browser to run your Nightwatch tests. The auto-generated nightwatch.conf.js already includes configuration, so you can just run by passing the edge environment:

$ nightwatch --env edge

Parallelism for Firefox, Chrome, Safari, and Edge

You can now run tests in parallel via workers in any browser. Not only that, but now you can also run via test workers across multiple browsers in parallel.

Example:

$ nightwatch --env edge,firefox,chrome --parallel

New API commands

  • .findElement() / .findElements() - these commands provide improved support for locating single/multiple elements on the page; the response contains the web element id and a .getId() convenience method.

Example:

const resultElements = await browser.findElements('.features-container li');
resultElements.forEach(item => console.log('Element Id:', item.getId()))

const resultElement = await browser.findElement('.features-container li:first-child');
console.log('Element Id:', resultElement.getId());
  • .setPassword - support to redact params in logs (#2672)
  • .isSelected() element command and assert.selected() assertion
  • .isEnabled() element command and assert.enabled() assertion

Fixes & Improvements

  • Added support to recursively append properties from super-env in test-settings (#2718)
  • Fixed #2695 - use locate strategy from args when valid strategy is found for waitFor element commands (#2716)
  • Fixed #2677 - add option to disable loading of typescript tests
  • Fixed an issue where test status wasn't reported for parallel runs (#2733)

Don't miss a new nightwatch release

NewReleases is sending notifications on new releases.