Hello,
I’ve been trying to run tests on Sauce Labs with Firefox. But I’ve been getting a java.lang.NullPointerException
:
Go to Google --
Emitted | suite.before ([object Object])
Show Google
Emitted | test.before ([object Object])
[1] Error | Error: java.lang.NullPointerException
Emitted | test.failed ([object Object])
✖ "before each" hook: codeceptjs.before for "Show Google" in 12705ms
[1] Error | Error: java.lang.NullPointerException
Error: java.lang.NullPointerException
Emitted | test.after ([object Object])
Emitted | suite.after ([object Object])
-- FAILURES:
1) Go to Google
"before each" hook: codeceptjs.before for "Show Google":
java.lang.NullPointerException
rror: java.lang.NullPointerException
at getErrorFromResponseBody (node_modules/webdriver/build/utils.js:215:10)
at Request._callback (node_modules/webdriver/build/request.js:103:64)
at Request.self.callback (node_modules/request/request.js:185:22)
at Request.EventEmitter.emit (domain.js:448:20)
at Request.<anonymous> (node_modules/request/request.js:1161:10)
at Request.EventEmitter.emit (domain.js:448:20)
at IncomingMessage.<anonymous> (node_modules/request/request.js:1083:12)
FAIL | 0 passed, 1 failed, 1 skipped // 13s
Emitted | global.result ([object Object])
Emitted | global.after ([object Object])
This is my config:
const SAUCE_USERNAME = "username"
const SAUCE_ACCESS_KEY = "key"
exports.config = {
tests: './src/*.spec.js',
output: './output',
helpers: {
WebDriver: {
url: 'https://google.com',
browser: 'firefox',
capabilities: {
browserName: 'firefox',
},
user: SAUCE_USERNAME,
key: SAUCE_ACCESS_KEY,
},
},
plugins: {
wdio: {
enabled: true,
user: SAUCE_USERNAME,
key: SAUCE_ACCESS_KEY,
region: 'us',
services: ['sauce'],
},
},
mocha: {},
name: 'mytests',
}
I’m running CodeceptJS 2.3.0 and webdriverio 5.12.5.
Any idea why this is happening?