I have created a project using vue.js. The project includes a small set of unit tests (jest) and an end-to-end test (night watch).
Unfortunately, when attempting to run the end-to-end test using npm I encountered the following error:
Error retrieving a new session from the selenium server
Connection refused! Is the selenium server started?
{ value:
{ message: 'Unable to create session from org.openqa.selenium.remote.NewSessionPayload@16b328bc\nBuild info: version: \'3.12.0\', revision: \'7c6e0b3\', time: \'2018-05-08T15:15:08.936Z\'\nSystem info: host:
\'SYNERGY02\', ip: \'192.168.1.41\', os.name: \'Windows 10\', os.arch: \'amd64\', os.version: \'10.0\', java.version: \'1.8.0_181\'\nDriver info: driver.version: unknown',
error: 'session not created' },
status: 33 }
I'm at a loss as to what could be causing this issue. It's been holding me up for over a week.
Here is the nightwatch.json configuration file:
Path to Microsoft WebDriver in D:\xxx\test\bin\myedgedriver.exe
Path to Nightwatch configuration file in D:\xxx\test\e2e\nightwatch.conf.js
require('babel-register')
var config = require('../../config')
// Nightwatch settings
module.exports = {
src_folders: ['test/e2e/specs'],
output_folder: 'test/e2e/reports',
custom_assertions_path: ['test/e2e/custom-assertions'],
selenium: {
start_process: true,
server_path: require('selenium-server').path,
host: '127.0.0.1',
port: 4444,
cli_args: {
"webdriver.edge.driver": "../bin/MicrosoftWebDriver.exe",
'webdriver.chrome.driver': require('chromedriver').path,
}
},
test_settings: {
default: {
selenium_port: 4444,
selenium_host: 'localhost',
silent: true,
globals: {
devServerURL: 'http://localhost:' + (process.env.PORT || config.dev.port)
}
},
chrome: {
desiredCapabilities: {
browserName: 'chrome',
javascriptEnabled: true,
acceptSslCerts: true
}
},
firefox: {
desiredCapabilities: {
browserName: 'firefox',
javascriptEnabled: true,
acceptSslCerts: true
}
},
edge: {
desiredCapabilities: {
browserName: 'edge',
javascriptEnabled: true,
acceptSslCerts: true,
nativeEvents: true
}
}
}
}
Window version:
1803 (os build 17134.285)
Microsoft Edge WebDriver version:
Release 17134
Version: 6.17134 | Edge version supported: 17.17134
Microsoft Edge browser version:
Microsoft Edge 42.17134.1.0
Nightwatch version in package.json:
"nightwatch": "^0.9.12"
"selenium-server": "^3.0.1"