unknown error: Chrome failed to start: exited abnormally (Driver info: chromedriver=2.9
I finally managed to get Selenium tests starting the Chrome Driver on my laptop (server).
The important bit is to use Xvfb
. Don't ask me why but once you accept this fact follow these steps (more detailed than @Anon answer)
In you Jenkins settings add a global property
key : DISPLAYvalue:0:0
On your server start
Xvfb
in the background:Xvfb :0 -ac -screen 0 1024x768x24 &
Are you passing the DISPLAY parameter to your Jenkins job?
I assume you are trying to execute the tests in headless mode, too. So setup some x service (i.e. Xvfb) and pass the DISPLAY number to your job. Worked for me.
I was trying to run selenium on Jenkins with Mocha framework using wdio. So following are the steps to solve this issue:-
Install google chrome
sudo apt-get update sudo apt-get install google-chrome-stable
Install chrome-driver
wget http://chromedriver.storage.googleapis.com/2.23/chromedriver_linux64.zipunzip chromedriver_linux64.zip
Run following commands to start selenium web server
nohup sudo Xvfb :10 -acexport DISPLAY=:10java -jar vendor/se/selenium-server-standalone/bin/selenium-server-standalone.jar -Dwebdriver.chrome.bin="/usr/bin/google-chrome" -Dwebdriver.chrome.driver="vendor/bin/chromedriver"
After this start you tests with wdio command
wdio wdio.conf.js