Skip to content

Migrating to Nightwatch 2.0

Andrei Rusu edited this page Dec 6, 2021 · 2 revisions

Below is a list of potentially breaking changes in version 2.0 and deprecated functionality which was removed. All attempts have been made to ensure a complete and accurate list, but there might be things which we overlooked.

We have tried to minimize the amount of breaking changes as much as possible but some of them were difficult to avoid.

Using ES6 async/await

When using ES6 async/await test cases, the result value of Nightwatch commands does not contain the status and value properties anymore, but simply the value (this can be reversed by setting backwards_compatibility_mode to true in your nightwatch config).

Element locate errors:

Changes in the result object:

  • contains an error property which is an Error object instance
  • no longer contains httpStatusCode property
  • no longer contains value property

Dependencies

  • removed proxy-agent as dependency since it was frequently causing dependency issues; the proxy-agent package can be installed separately from NPM and used in the same way.

Other

Deprecated

TBA