4
我試圖啓動硒的獨立服務器(https://www.npmjs.com/package/selenium-standalone),它拋出一個錯誤:指定要chromedriver路徑硒獨立
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
硒服務器在路徑尋找chromedriver
/usr/local/lib/node_modules/selenium-standalone/.selenium/chromedriver/2.18-x64-chromedriver
默認情況下。
是否可以在運行服務器時在命令行指定chromedriver位置?例如:
selenium-standalone -Dwebdriver.chrome.driver=<path_to_chromedriver> start