I had to follow these steps to get the Selenium server running on my ubuntu development machine:
-
sudo npm install -g selenium-standalone
-
sudo selenium-standalone install
I found I needed a program called xvfb-run to run chrome in a virtual X enviroment
-
sudo apt install xvfb
Command to start selenium server with chrome driver is:
-
xvfb-run java -Dwebdriver.chrome.driver=/usr/local/lib/node_modules/selenium-standalone/.selenium/chromedriver/2.33-x64-chromedriver -jar /usr/local/lib/node_modules/selenium-standalone/.selenium/selenium-server/3.7.1-server.jar
I made a shortcut to this sel in my bin
-
#!/bin/bash
-
#Start selenium server with chrome driver extension
-
-
if [[ "${EUID}" -eq 0 ]];
-
then
-
echo "Please do not run as root"
-
exit
-
fi
-
-
xvfb-run java -Dwebdriver.chrome.driver=/usr/local/lib/node_modules/selenium-standalone/.selenium/chromedriver/2.33-x64-chromedriver -jar /usr/local/lib/node_modules/selenium-standalone/.selenium/selenium-server/3.7.1-server.jar
-
-
-
##xvfb-run java -Dwebdriver.chrome.driver=/usr/local/lib/node_modules/selenium-standalone/.selenium/chromedriver/2.33-x64-chromedriver -jar /usr/local/lib/node_modules/selenium-standalone/.selenium/selenium-server/3.7.1-server.jar -debug
I was trying to get the following tests working:
http://codecept.io/quickstart/
RJM Article Type
Quick Reference