Skip to content

Commit

Permalink
capabilities issue fix
Browse files Browse the repository at this point in the history
(cherry picked from commit 323c3940b9a57a6c750bc1ffc168de1cca711c1a)
  • Loading branch information
harshit-bs committed Aug 17, 2023
1 parent 1067d88 commit 187db59
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion lib/runner/test-runners/cucumber/_setup_cucumber_runner.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
const Nightwatch = require('../../../index.js');
const {Before, After, setDefaultTimeout} = require('@cucumber/cucumber');
const NightwatchFormat = require('./nightwatch-format.js');
const NightwatchFormatter = require('./nightwatch-format.js');

setDefaultTimeout(-1);

Expand Down Expand Up @@ -65,6 +65,12 @@ Before(function({pickle, testCaseStartedId}) {
if (options.auto_start_session || typeof options.auto_start_session == 'undefined') {
return this.client.launchBrowser().then(browser => {
this.browser = browser;
}).catch(error => {
NightwatchFormatter.setCapabilities({
error: error
});

throw error;
});
}
});
Expand Down

0 comments on commit 187db59

Please sign in to comment.