36

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:

  • Creating the browser session is handled by the Nightwatch module from lib/index.js, in the startSession function;
  • Killing the browser would correspond to the delete command place in the Selenium action queue in the terminate function of that module;
  • A new Nightwatch client is created at every test run, which happens every time we load a different test file;

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...

5

0

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.