Reputation: 1813
I am trying to start the selenium-standalone server (https://www.npmjs.com/package/selenium-standalone) and it is throwing an error:
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
The selenium server is looking for the chromedriver at path
/usr/local/lib/node_modules/selenium-standalone/.selenium/chromedriver/2.18-x64-chromedriver
by default.
Is it possible to specify the chromedriver location at the command line while running the server? Something like:
selenium-standalone -Dwebdriver.chrome.driver=<path_to_chromedriver> start
Upvotes: 5
Views: 5685
Reputation: 9117
Is possible that you need to install it first!
➜ ~ selenium-standalone install
----------
selenium-standalone installation starting
----------
---
selenium install:
from: https://selenium-release.storage.googleapis.com/2.53/selenium-server-standalone-2.53.0.jar
to: /usr/local/lib/node_modules/selenium-standalone/.selenium/selenium-server/2.53.0-server.jar
---
chrome install:
from: https://chromedriver.storage.googleapis.com/2.21/chromedriver_mac32.zip
to: /usr/local/lib/node_modules/selenium-standalone/.selenium/chromedriver/2.21-x64-chromedriver
selenium-standalone installation [================== ] 91% 8.2s
selenium-standalone provide this command to helps you download and install chromedriver. Additionally, it provides commands to setup and download differents options for selenium, chromedriver and architecture (I didn't find a command to set path)
# choose selenium version
selenium-standalone install --version=2.45.0 --baseURL=https://selenium-release.storage.googleapis.com
# choose chrome driver version
selenium-standalone install --drivers.chrome.version=2.15 --drivers.chrome.baseURL=https://chromedriver.storage.googleapis.com
# choose ie driver architecture
selenium-standalone start --drivers.ie.arch=ia32 --drivers.ie.baseURL=https://selenium-release.storage.googleapis.com
Upvotes: 7