-
Install selenium
wget http://selenium-release.storage.googleapis.com/2.53/selenium-server-standalone-2.53.0.jar
-
Install chromedriver
sudo apt-get install -y unzip curl -Lo chromedriver.zip http://chromedriver.storage.googleapis.com/2.22/chromedriver_linux64.zip && unzip chromedriver.zip && chmod a+x chromedriver sudo cp chromedriver /usr/bin/chromedriver
-
Install chrome-browser
http://askubuntu.com/questions/79280/how-to-install-chrome-browser-properly-via-command-line
-
Install virtual X server
sudo apt-get install xvfb
-
Fix issue with selenium node registration
sudo apt-get install -y haveged sudo service haveged start sudo update-rc.d haveged defaults
In separate terminals run:
-
Selenium Hub (which accepts requests from test framework):
java -jar selenium-server-standalone-2.53.0.jar -role hub -timeout 300
-
Selenium Node (which will run the browsers) together with virtual X server. Following allows to run 30 chrome browsers:
DISPLAY=:1 xvfb-run java -jar selenium-server-standalone-2.53.0.jar -role node -hub http://localhost:4444/grid/register -browser browserName=chrome,maxInstances=30 -maxSession 30