我正在使用Jenkins进行硒夜测试。
当我运行测试时,出现以下错误:
Connection refused! Is selenium server started?
我的nightwatch.json文件中有以下配置:
"selenium": {
"start_process": true,
"server_path": "lib/selenium-server-standalone-2.52.0.jar",
"log_path": "",
"host": "127.0.0.1",
"port": 4444,
"cli_args": {
"webdriver.chrome.driver": "lib/chromedriver",
"webdriver.ie.driver": "lib/IEDriverServer_x64_2.52.2.exe",
"trustAllSSLCertificates": true
}
我猜Jenkins正在尝试连接到PORT,但无法这样做。有人可以帮忙吗?
答案 0 :(得分:0)
确保browserName正确无误。
"desiredCapabilities": {
"browserName": "internet explorer",
"javascriptEnabled": true,
"acceptSslCerts": true
}
browserName:“Internet explorer”而不是“ie” 你也错过了webdriver.chrome.driver中的“.exe”