Reputation: 11617
We would love to adopt Nightwatch.js
for testing on browsers, but we're stuck on one major caveat: at the time of this writing, Nightwatchjs does not support running different tests using the same browser session. In short, it means that:
Selenium
action queue in the terminate function of that module;According to this source, it is possible to reuse the current browser session in Selenium, instead of opening a new window.
Has anyone managed to fix this problem in Nightwatch?
Here's the feature request on Github, which was requested on Mar 31, 2014 and is still open.
Another approach would be to circumvent the problem altogether by getting Nightwatch to merge all different files into one Test Suite, but that seems to be harder to solve than the problem with sessions...
Upvotes: 52
Views: 5038
Reputation: 41
Nightwatch now has support for resuing browser sessions. You can simply use the flag --reuse-browser
to reuse sessions while running your nightwatch tests.
Upvotes: 3