Release notes
v3.5.0
Mar 15, 2024What's Changed
- Add actionable error message for
TimeoutErrorin hooks. by @dikwickley in https://github.com/nightwatchjs/nightwatch/pull/4053 - Add missing
isSelectedcommand to new Element API. by @dikwickley in https://github.com/nightwatchjs/nightwatch/pull/4038 - Added missing
isEnabledcommand in new Element API by @subhajit20 in https://github.com/nightwatchjs/nightwatch/pull/4041 - Refactor commands in README. by @konavivekramakrishna in https://github.com/nightwatchjs/nightwatch/pull/4076
- Hide password values from raw HTTP logs. by @dikwickley in https://github.com/nightwatchjs/nightwatch/pull/4066
- Fix JSDoc example for getText command. by @garg3133 in https://github.com/nightwatchjs/nightwatch/pull/4043
- Added missing
isVisiblecommand in new Element API by @subhajit20 in https://github.com/nightwatchjs/nightwatch/pull/4039 - Added
isDisplayed()as alias toisVisible()by @uditrajput03 in https://github.com/nightwatchjs/nightwatch/pull/4107 - fixed
takeScreenshotexample by @dikwickley in https://github.com/nightwatchjs/nightwatch/pull/4121 - allow parallel envs with cucumber by @AutomatedTester in https://github.com/nightwatchjs/nightwatch/pull/4095
New Contributors
- @dikwickley made their first contribution in https://github.com/nightwatchjs/nightwatch/pull/4053
- @subhajit20 made their first contribution in https://github.com/nightwatchjs/nightwatch/pull/4041
- @konavivekramakrishna made their first contribution in https://github.com/nightwatchjs/nightwatch/pull/4076
- @uditrajput03 made their first contribution in https://github.com/nightwatchjs/nightwatch/pull/4107
Full Changelog: https://github.com/nightwatchjs/nightwatch/compare/v3.4.1...v3.5.0
v3.4.1
Feb 16, 2024What's Changed
- Warn about two
describe()s in a single testsuite. by @garg3133 in #4011 - Fix error while exiting Nightwatch using Ctrl+C. by @garg3133 in #4013
- deps: Update
piscinadependency tov4.3.1. by @garg3133 in #4020 - Send
POST_SESSION_EVENTwith capabilities on session creation. by @garg3133 in #4024 - Add appium reset command by @AutomatedTester in #4019
- Disable HTML reporter in Cucumber. by @garg3133 in #4025
Full Changelog: https://github.com/nightwatchjs/nightwatch/compare/v3.4.0...v3.4.1
v3.4.0
Jan 29, 2024What's Changed
Fixed and improvements:
- Fixed #3998 – cannot set custom session status for retried test when using Browserstack, by Priyansh Garg in #3999
- Fixed #3990 – CDP connection not getting reset across sessions when using Selenium, by Priyansh Garg in #3994
- Fixed #3989 – Unable to fetch elements with reference to a ShadowRoot, by Priyansh Garg in #3992
- Fixed #4003 – Replace per-method packages with the main
lodashpackage, by Priyansh Garg in #4005 - Fixed #4007 – add
parallel_process_delayin worker threads by @gravityvi in #4007 - Fixed test hooks giving TypeScript error with
NightwatchBrowser, by Priyansh Garg in #4004 - Added extended types for
waitForcommands, by Priyansh Garg in #3986
Dependency updates:
- Upgraded Selenium to 4.16 by David Burns in #4008. This upgrade brings improved stability, new features, and bug fixes, enhancing the overall testing capabilities with Nightwatch.
- Updated
nightwatch-axe-verbosedependency to enhance accessibility testing features, including improved axe-core integration and support for advanced configurations. by Priyansh Garg in #3993
Full Changelog
v3.3.8
Jan 10, 2024What's Changed
- Fix types for Nightwatch settings/config file. by @garg3133 in https://github.com/nightwatchjs/nightwatch/pull/3876
- Update dependencies. by @garg3133 in https://github.com/nightwatchjs/nightwatch/pull/3985
Full Changelog: https://github.com/nightwatchjs/nightwatch/compare/v3.3.7...v3.3.8
v3.3.7
Dec 29, 2023- Added – support for defining a custom return function for custom command fe9a01
v3.3.5
Dec 14, 2023What's Changed
- Fixed process stalling for 4 mins after test run in Node v20+. by @garg3133 in #3976
- Fixed #3639 waitFor commands not retrying for stale elements. by @garg3133 in #3978
Full Changelog: https://github.com/nightwatchjs/nightwatch/compare/v3.3.4...v3.3.5
v3.3.4
Dec 11, 2023What's Changed
v3.3.3
Dec 7, 2023What's Changed
- add check for browserstack turboscale urls by @nikhlagrwl in https://github.com/nightwatchjs/nightwatch/pull/3970
Full Changelog: https://github.com/nightwatchjs/nightwatch/compare/v3.3.2...v3.3.3
v2.6.23
Dec 7, 2023What's Changed
- add support for browserstack turboscale urls by @nikhlagrwl in https://github.com/nightwatchjs/nightwatch/pull/3969
Full Changelog: https://github.com/nightwatchjs/nightwatch/compare/v2.6.22...v2.6.23
v3.3.2
Nov 16, 2023What's Changed
- enable parallelism on any selenium host by @gravityvi in https://github.com/nightwatchjs/nightwatch/pull/3956
- improved the support for defining custom reporters via plugins
Full Changelog: https://github.com/nightwatchjs/nightwatch/compare/v3.3.1...v3.3.2
v3.3.0
Nov 7, 2023What's Changed
Fixes
- Update the description of abortOnFailure for waitForElementVisible.js by @gravityvi in https://github.com/nightwatchjs/nightwatch/pull/3934
- remove upper bound for number of worker threads by @gravityvi in https://github.com/nightwatchjs/nightwatch/pull/3930
- remove postInstall step by @AutomatedTester in https://github.com/nightwatchjs/nightwatch/pull/3953
- enable worker threads for mobile while using cloud services by @gravityvi in https://github.com/nightwatchjs/nightwatch/pull/3954
Dependencies
- Update Selenium to 4.14 by @AutomatedTester in https://github.com/nightwatchjs/nightwatch/pull/3944
- chore: update dependencies by @AutomatedTester in https://github.com/nightwatchjs/nightwatch/pull/3943
Full Changelog: https://github.com/nightwatchjs/nightwatch/compare/v3.2.1...v3.3.0
v3.2.1
Oct 5, 2023What's Changed
- CVE 2023 43646 by @AutomatedTester in https://github.com/nightwatchjs/nightwatch/pull/3925
Full Changelog: https://github.com/nightwatchjs/nightwatch/compare/v3.2.0...v3.2.1
v3.2.0
Sep 27, 2023What's Changed
New Features
- add wait until present command by @gravityvi in https://github.com/nightwatchjs/nightwatch/pull/3897
- event setup for nightwatch hooks by @harshit-bs in https://github.com/nightwatchjs/nightwatch/pull/3706
Fixes
- Use correct settings parameter for trace by @swrdfish in https://github.com/nightwatchjs/nightwatch/pull/3890
- Allow
WebElementas a possible selector in type declarations. by @garg3133 in https://github.com/nightwatchjs/nightwatch/pull/3896 - run mocha on child process workers by @gravityvi in https://github.com/nightwatchjs/nightwatch/pull/3904
- add GitHub Actions in the list of supporting colors by @gravityvi in https://github.com/nightwatchjs/nightwatch/pull/3914
- remove color param from mocha cli runner tests by @gravityvi in https://github.com/nightwatchjs/nightwatch/pull/3919
- consider always match from desired capabilities by @gravityvi in https://github.com/nightwatchjs/nightwatch/pull/3907 (#3431)
- Pass settings object to global hooks while called from programatic api by @swrdfish in https://github.com/nightwatchjs/nightwatch/pull/3850 (#3849)
Dependency Updates
- bump to selenium 4.13 by @AutomatedTester in https://github.com/nightwatchjs/nightwatch/pull/3920
TypeScript Improvements
- Migrate utils modules to TS. by @garg3133 in https://github.com/nightwatchjs/nightwatch/pull/3869
- Refactor utils modules before migrating to TS. by @garg3133 in https://github.com/nightwatchjs/nightwatch/pull/3870
- Migrate lib/http files to TS. by @yashPratp983 in https://github.com/nightwatchjs/nightwatch/pull/3886
Build Improvements
- Fix eslint rules by @garg3133 in https://github.com/nightwatchjs/nightwatch/pull/3891
- Change file names for execute commands. by @garg3133 in https://github.com/nightwatchjs/nightwatch/pull/3898
Full Changelog: https://github.com/nightwatchjs/nightwatch/compare/v3.1.3...v3.2.0
v2.6.22
Sep 27, 2023What's Changed
- Lifecycle event hooks support for v2 by @harshit-bs in https://github.com/nightwatchjs/nightwatch/pull/3817
Full Changelog: https://github.com/nightwatchjs/nightwatch/compare/v2.6.21...v2.6.22
v3.1.3
Aug 21, 2023What's Changed
- Fix waitUntil paramenter ordering; update waitUntil documentation; 3839
- Fixed build script and dev script for running tests on windows. 3866
- Fix flaky disable_typescript config test. https://github.com/nightwatchjs/nightwatch/pull/3865
- Fix .registerBasicAuth() not working in Edge browser Fixes #3848 https://github.com/nightwatchjs/nightwatch/pull/3857
- fix es6 module import by https://github.com/nightwatchjs/nightwatch/pull/3858
- Update a few eslint rules around spacing. https://github.com/nightwatchjs/nightwatch/pull/3864
- FAdd tag_filter type to NightwatchOptions interface. #3825 https://github.com/nightwatchjs/nightwatch/pull/3830
- chore: bump mocha 9.2.2 => 10.2.0 https://github.com/nightwatchjs/nightwatch/pull/3860
- Add more events for analytics https://github.com/nightwatchjs/nightwatch/pull/3856
- Move log related commands to
.logsnamespaces. https://github.com/nightwatchjs/nightwatch/pull/3796 - Update Selenium to 4.11 https://github.com/nightwatchjs/nightwatch/pull/3882
- Deprecate colors.js module in favour of chalk.js https://github.com/nightwatchjs/nightwatch/pull/3852
New Contributors
- @DenysLins made their first contribution in https://github.com/nightwatchjs/nightwatch/pull/3857
- @ert78gb made their first contribution in https://github.com/nightwatchjs/nightwatch/pull/3858
- @Ykumar1415 made their first contribution in https://github.com/nightwatchjs/nightwatch/pull/3830
Full Changelog: https://github.com/nightwatchjs/nightwatch/compare/v3.1.2...v3.1.3
- Fix for failing TS tests after upgrading to v3. (#3845) 96e1b346
- update lodash.merge dependency in client (#3836) 222c6035
https://github.com/nightwatchjs/nightwatch/compare/v3.1.0...v3.1.2
v3.1.0
Jul 26, 2023We’re super excited to announce the release of Nightwatch v3. It that has been built around these three pillars:
Developer Experience: The entire experience from getting started, to writing and debugging tests, has been redesigned for speed, stability, and consistent non-flaky results.
Mobile first: Test your web or native, iOS and Android, mobile applications on simulators, real mobile devices or a cloud grid like BrowserStack.
One test automation framework: Run all types of tests from unit, component, and E2E to API, visual, and accessibility with a single framework.
What's Changed
New Features
- Add support for namespaced aliases. by @garg3133 in https://github.com/nightwatchjs/nightwatch/pull/3794
- Move execute and executeAsync to document ns. by @garg3133 in https://github.com/nightwatchjs/nightwatch/pull/3807
- Move network-related commands to .network namespace. by @yashPratp983 in https://github.com/nightwatchjs/nightwatch/pull/3797
Fixes
TypeScript Fixes
- Fix types for namespaces on page-objects. by @garg3133 in https://github.com/nightwatchjs/nightwatch/pull/3778
- Add types for Firefox namespace commands by @Priyanka0613 in https://github.com/nightwatchjs/nightwatch/pull/3780
- Add types support in Nightwatch examples, test, and types/tests directories. by @yashPratp983 in https://github.com/nightwatchjs/nightwatch/pull/3803
- Build Nightwatch using TypeScript. by @garg3133 in https://github.com/nightwatchjs/nightwatch/pull/3774
Dependency Updates
- update dependency nightwatch-axe-verbose to ^2.2.2 by @justafish in https://github.com/nightwatchjs/nightwatch/pull/3793
- Update jsdom to v21.1.2 and npm audit fix. by @itsspriyansh in https://github.com/nightwatchjs/nightwatch/pull/3811
- Uninstall Coveralls by @itsspriyansh in https://github.com/nightwatchjs/nightwatch/pull/3816
- updated semver to v7.5.2 by @itsspriyansh in https://github.com/nightwatchjs/nightwatch/pull/3829
Cucumber
- Fixes/3781 fix cucumber step definition config by @gravityvi in https://github.com/nightwatchjs/nightwatch/pull/3782
- allow esm imports (#3805) by @thermsdorff in https://github.com/nightwatchjs/nightwatch/pull/3806
General
- Fix takeScreenshot command not returning anything. by @garg3133 in https://github.com/nightwatchjs/nightwatch/pull/3769
- Feature/disable process listener for programattic api by @swrdfish in https://github.com/nightwatchjs/nightwatch/pull/3800
- Add missing documentation by @swrdfish in https://github.com/nightwatchjs/nightwatch/pull/3826
- Updated Error Message for Browser Compatibility Information. by @yashPratp983 in https://github.com/nightwatchjs/nightwatch/pull/3809
- programatic-api: add methods to call global hooks, add a cleanup method by @swrdfish in https://github.com/nightwatchjs/nightwatch/pull/3822
- add error handling for worker threads by @gravityvi in https://github.com/nightwatchjs/nightwatch/pull/3828
- Page-object commands should return the same page-object. by @garg3133 in https://github.com/nightwatchjs/nightwatch/pull/3779
- Fix elements and commands property issue with POM. by @garg3133 in https://github.com/nightwatchjs/nightwatch/pull/3788
- Fix sync tests getting skipped in parallel mode. by @garg3133 in https://github.com/nightwatchjs/nightwatch/pull/3791
- Fixed the issue regarding error if a folder defined in
src_foldersis empty when using tags by @itsspriyansh in https://github.com/nightwatchjs/nightwatch/pull/3824 - Fix #3625 - Changed to recursive merge on caps by @vinodreddy-bs in https://github.com/nightwatchjs/nightwatch/pull/3831
New Contributors
- @yashPratp983 made their first contribution in https://github.com/nightwatchjs/nightwatch/pull/3803
- @justafish made their first contribution in https://github.com/nightwatchjs/nightwatch/pull/3793
- @itsspriyansh made their first contribution in https://github.com/nightwatchjs/nightwatch/pull/3811
- @thermsdorff made their first contribution in https://github.com/nightwatchjs/nightwatch/pull/3806
- @vinodreddy-bs made their first contribution in https://github.com/nightwatchjs/nightwatch/pull/3831
Full Changelog: https://github.com/nightwatchjs/nightwatch/compare/v3.0.1...v3.1.0
Nightly 3.1.0-nightly-26072023
Jul 26, 2023Nightly 3.1.0-nightly-18072023
Jul 18, 2023V3.0.1
Jun 21, 2023We’re super excited to announce the release of Nightwatch v3. It that has been built around these three pillars:
Developer Experience: The entire experience from getting started, to writing and debugging tests, has been redesigned for speed, stability, and consistent non-flaky results.
Mobile first: Test your web or native, iOS and Android, mobile applications on simulators, real mobile devices or a cloud grid like BrowserStack.
One test automation framework: Run all types of tests from unit, component, and E2E to API, visual, and accessibility with a single framework.
New features
New element APIs
With Nightwatch v3, we have revamped the element API to make test authoring simpler and more concise. Learn more More rich & powerful selectors
New selectors are introduced as part of this latest versions
.findByText()
.findByPlaceholderText()
.findByAltText()
.findByRole()
You can also chain selectors to find elements that are more complex to find
For E.g.
browser.element.find('CSS Selector').findByText('text').click();
Performance improvements
Nightwatch v3 has implemented worker threads for parallel runs and we have observed improvements of up to 25% between Nightwatch v2 & v3. Try it now
Nightwatch inspector
Nightwatch v3 introduces a point and click tool that can help you easily find selectors. It will improve your productivity of authoring tests & help you find durable selectors for lower long term maintenance. Learn more
Angular component testing
With Nightwatch v3 you can test Angular components in isolation by mounting them in the browser. Try it now
Test doubles
The unit testing with Nightwatch got an upgrade as v3 introduced test doubles. You can use mocks, stubs & spies in your Nightwatch tests.
Fixes
Fix: incorrect build duration in HTML Report by @vaibhavsingh97 in #3658
Fix #3484 Added elementId only param in moveTo command by @harshit-bs in #3517
Fix xPath selectors to locate within elements. by @garg3133 in #3672
Other Improvements
Upgrade selenium to 4.10.0 by @AutomatedTester in #3705
Types migration from definitely typed to Nightwatch project by @beatfactor in #3714
Remove dependency on driver binaries, fallback to selenium-manager by @swrdfish in #3717
Add the ability to rerun failed tests by @prudhvi22 in #3703
Breaking changes
We have tried to ensure that there are no breaking changes while upgrading to v3. However, in case you need migration assistance please reach out to us on our new Nightwatch v3 channel on Discord