But upon running the tests I get the following in my terminal:
export BROWSERSTACK_ACCESS_USER=user_here && export BROWSERSTACK_ACCESS_KEY=key_here && yarn test:browserstack
yarn run v1.13.0
$ node test/functional/scripts/local.runner.js --config test/functional/config/browserstack.conf.js --env chrome,edge,firefox --suiteRetries 3
Connecting local
Connected. Now testing...
Cannot create property 'enabled' on boolean 'true'
at /Users/gavinjohnson/projects/uk-content-nightwatch-guide/test/functional/scripts/local.runner.js:19:10
at /Users/gavinjohnson/projects/uk-content-nightwatch-guide/test/functional/scripts/local.runner.js:17:16
error Command failed with exit code 1.
info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command.
Please see my slightly modified local.runner.js script for more detail:
#!/usr/bin/env node
const Nightwatch = require('nightwatch')
const browserstack = require('browserstack-local')
let bs_local
try {
process.mainModule.filename = './node_modules/.bin/nightwatch'
console.log('\nconnecting to browserstack')
Nightwatch.bs_local = bs_local = new browserstack.Local()
bs_local.start({ key: process.env.BROWSERSTACK_ACCESS_KEY, '--force-local': '--force-local' }, error => {
if (error) throw error
console.log('\nconnected to browserstack\n\ntests are now running against the following browsers:')
Nightwatch.cli((argv) => {
Nightwatch.CliRunner(argv)
.setup(null, () => {
process.kill(bs_local.pid)
})
.runTests(() => {
process.kill(bs_local.pid)
})
})
})
} catch (ex) {
console.log('\nthere was an error whilst starting the test runner:')
process.stderr.write(ex.stack + '\n')
process.exit(2)
}
This method had worked before the Nightwatch update and as far as I can see I've followed their instructions.
Hi,
I'm in the process of upgrading my Nightwatch package from
0.9.21
to1.0.19
.I'm having issues running the tests against BrowserStack I'm made all the amends to my BrowserStack config (see below) mentioned here
But upon running the tests I get the following in my terminal:
Please see my slightly modified
local.runner.js
script for more detail:This method had worked before the Nightwatch update and as far as I can see I've followed their instructions.
Please also see my dependencies below:
Any help here would be massively appreciated.
Thanks!