Here's my Selenium settings:
"selenium": {
"start_process": true,
"start_session": true,
"server_path": "./nightwatch/drivers/selenium-server.jar",
"log_path": "./nightwatch/reports",
"host": "127.0.0.1",
"port": 4444,
"cli_args": {
"webdriver.chrome.driver": "nightwatch/drivers/chromedriver.exe",
"webdriver.gecko.driver": "nightwatch/drivers/geckodriver.exe",
"webdriver.ie.driver": "nightwatch/drivers/IEDriverServer.exe"
}
}
My Firefox setup:
"firefox": {
"selenium_port": 4444,
"default_path_prefix": "/wd/hub",
"globals": {
"environment": "firefox"
},
"desiredCapabilities": {
"browserName": "firefox",
"alwaysMatch": {
"moz:firefoxOptions": {
"args": ["-headless"]
}
}
}
}
Firefox is successfully opening and doing the tests but not in headless mode.
Versions I am using:
I have this working with the following config - the main differences being not setting alwaysMatch
and the args double-dash: --headless
.
Also note that when specifying env
to vue-cli-service
it expects a space, not an =
before the env name, i.e.:
vue-cli-service test:e2e --env FirefoxHeadless
"FirefoxHeadless": {
"desiredCapabilities": {
"browserName": "firefox",
"acceptInsecureCerts": true,
"moz:firefoxOptions": {
"args": ["--headless"]
}
}
}
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With