nightwatch
nightwatch copied to clipboard
Setting output:false in nightwatch.conf.js is not disabling navigation output messages ℹ Loaded url ...
Describe the bug
Setting output: false
in the nightwatch.conf.js file is not working for navigation output.
I am using cucumber test runner using these configs:
module.exports = {
output: false,
test_runner: {
// set cucumber as the runner
type: 'cucumber',
...
}
}
Based on the documentation, and the code in https://github.com/nightwatchjs/nightwatch/blob/19ce6375c1284d4609e7f8a6b3dab07bb1e3790a/lib/api/protocol/url.js, I am expecting messages like below not to appear: ℹ Loaded url http://localhost:3002
It seems as if this.settings.output
is not receiving the false
value set in the nightwatch.conf.js
Environment
Executable | Version |
---|---|
nightwatch --version |
2.2.3 |
npm --version |
6.14.15 |
node --version |
14.18.1 |
Browser driver | Version |
---|---|
NAME | VERSION |
chromedriver | 103 |
OS | Version |
---|---|
NAME | VERSION |
macOS Big Sur | 11.6.5 |
Some more context, I added console.log('this.settings.output:', this.settings.output)
in lib/api/protocol/url.js
And even though I have { output: false }
in my nightwatch.conf.js
the console.log
still outputs this.settings.output: true
Some more notes I found.
Looks like the file where the issue is at is cucumber-js/_setup_cucumber_runner.js
When the client is created, this line is not taking into account the output
setting from nightwatch.conf.js:
this.client = Nightwatch.createClient({
...
output: !this.parameters['disable-output'],
...
});
I got it to work by adding to my command:
npx nightwatch --disable-output