Nightwatch / selenium - 错误:无法访问jarfile

时间:2017-02-01 18:37:09

标签: selenium nightwatch.js selenium-server

我正在尝试运行一些功能测试但是我遇到了这个错误。

Starting selenium server... There was an error while starting the Selenium server:

Error: Unable to access jarfile 
./node_modules/selenium-standalone/.selenium/selenium-server/3.0.1-server.jar

这是我在nightwatch.json文件中的配置

"selenium": {
"start_process": true,
"start_session" : true,
"host": "127.0.0.1",
"port": 4444,
"log_path": "./test/e2e/",
"server_path": "./node_modules/selenium-standalone/.selenium/selenium-server/3.0.1-server.jar",
"cli_args" : {
  "webdriver.chrome.driver" : "./node_modules/selenium-standalone/.selenium/chromedriver/2.27-x64-chromedriver"
 }
}

1 个答案:

答案 0 :(得分:-1)

检查您的server_path。该文件位于该位置还是其他位置?这是真正的Selenium jar&版?根据需要进行调整。