-
-
Save OliPassey/c995e16e9b4110a8d06449f1560676d1 to your computer and use it in GitHub Desktop.
Setup Selenium Server on Ubuntu 14.04
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
# Following the guide found at this page | |
# http://programmingarehard.com/2014/03/17/behat-and-selenium-in-vagrant.html | |
echo "\r\nUpdating system ...\r\n" | |
sudo apt-get update | |
# Create folder to place selenium in | |
# | |
echo "\r\nCreating folder to place selenium in ...\r\n" | |
sudo mkdir ~/selenium | |
cd ~/selenium | |
# Get Selenium and install headless Java runtime | |
# | |
echo "\r\nInstalling Selenium and headless Java runtime ...\r\n" | |
sudo wget https://selenium-release.storage.googleapis.com/3.6/selenium-server-standalone-3.6.0.jar | |
sudo apt-get install openjdk-7-jre-headless -y | |
# Add Java 8 | |
sudo apt-add-repository ppa:webupd8team/java -y | |
sudo apt-get update | |
sudo apt-get install oracle-java8-installer | |
# Install Firefox | |
# | |
echo "\r\nInstalling Firefox ...\r\n" | |
sudo apt-get install firefox -y | |
# Install headless GUI for firefox. 'Xvfb is a display server that performs graphical operations in memory' | |
# | |
echo "\r\nInstalling XVFB (headless GUI for Firefox) ...\r\n" | |
sudo apt-get install xvfb -y | |
wget https://github.com/mozilla/geckodriver/releases/download/v0.19.1/geckodriver-v0.19.1-linux64.tar.gz | |
sudo mv geckodriver-v0.19.1-linux64.tar.gz /usr/local/bin | |
sudo tar xvzf /usr/local/bin/geckodriver-v0.19.1-linux64.tar.gz | |
# Finally, starting up Selenium server | |
# | |
echo "\r\nStarting up Selenium server ...\r\n" | |
DISPLAY=:1 xvfb-run java -jar ~/selenium/selenium-server-standalone-3.6.0.jar |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Bumped Selenium to latest 3.6.0
Added Java8 via unofficial Ubuntu 14.04 Repo
Added Gecko Driver install (untested)
Should now run without intervention