What's new with Nightwatch v2?



Nightwatch's underlying architecture has been completely redesigned by the Nightwatch team to improve cross-browser integration and DOM element handling. Nightwatch also runs faster tests. It now uses the Selenium Webdriver bindings to Node.js.

These are the top features and enhancements that make Nightwatch even more powerful than ever:

Support for Actions API

Automate complex gestures with the new API user actions (via the existing .perform() command).

Expanded automatic command retries

Nightwatch will attempt to retry failed element commands, such as when click encounters errors such as element click interception.

Locators for relative elements

Nightwatch automatically includes the new Selenium 4 relative locators. It also enhances the existing locators via Selenium By() API.

Support for file uploads built-in

Nightwatch uploading files can be difficult, but Nightwatch v2 comes with a built-in command that works with the fileDetectorAPI.

Extended Capabilities Support

While the nightwatch.conf.js configuration file will continue to be the primary method of defining capabilities, all capabilities objects created using the Selenium CapabilitiesAPI are supported in v2.

Chrome: Setting network conditions

When working with browser automation, manipulating network conditions is an often needed feature. v2 supports this feature for Chrome and Edge at the beginning.

Support for Devtools Protocol

Nightwatch can now run Chrome DevTools commands. Chrome DevTools Protocol provides tools for inspecting, diagnosing, debugging, profiling, and instrumenting Chromium-based browsers such as Chrome or Edge.

Ready for Webdriver BiDi

The most recent development in Selenium is the BiDirectional WebDriver Protocol. These APIs allow you to receive Javascript or console error messages directly from your browser. It will be available in Nightwatch as soon as possible. The Selenium website will keep you updated on its progress.

Many new command APIs

Nightwatch v2 will also include a new API,.ensure assert, which will mirror the Selenium till APIs, global elements(), expect() and by() and browser objects. This will improve the experience of writing tests, as well as provide greater flexibility.

Test runner improvements

Nightwatch v2 will also include some enhancements to the test runner such as the ability to rerun failed tests and better support for parallel execution.

This list is not exhaustive and Nightwatch v2 has a host of new updates. Visit nightwatch.org to learn more and upgrade to the latest version.

Nightwatch

Nightwatch was released in the first quarter of 2014. It was designed to be a complete, integrated framework that engineers could use to quickly create end-to-end testing and requires minimal configuration and maintenance.


Comments

Popular posts from this blog

Cross Browser Visual Testing on Real Mobile Devices

Targeting the layers – Test automation strategy paradigm