【发布时间】:2016-01-19 08:07:51
【问题描述】:
我正在尝试启动 selenium-standalone 服务器 (https://www.npmjs.com/package/selenium-standalone),但它抛出了一个错误:
14:19:09 /usr/local/lib/node_modules/selenium-standalone/bin/selenium-standalone:54
14:19:09 throw err;
14:19:09 ^
14:19:09 Error: Missing /usr/local/lib/node_modules/selenium-standalone/.selenium/chromedriver/2.18-x64-chromedriver
14:19:09 at /usr/local/lib/node_modules/selenium-standalone/lib/check-paths-existence.js:15:20
14:19:09 at Object.cb [as oncomplete] (fs.js:169:19)
14:19:09 Build step 'Execute shell' marked build as failure
selenium 服务器正在路径中寻找 chromedriver
/usr/local/lib/node_modules/selenium-standalone/.selenium/chromedriver/2.18-x64-chromedriver
默认情况下。
是否可以在运行服务器时在命令行中指定 chromedriver 位置?比如:
selenium-standalone -Dwebdriver.chrome.driver=<path_to_chromedriver> start
【问题讨论】:
标签: javascript selenium command-line npm selenium-chromedriver