-
-
Save curtismcmullan/7be1a8c1c841a9d8db2c to your computer and use it in GitHub Desktop.
#!/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 http://selenium-release.storage.googleapis.com/2.44/selenium-server-standalone-2.44.0.jar | |
sudo apt-get install openjdk-7-jre-headless -y | |
# 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 | |
# Finally, starting up Selenium server | |
# | |
echo "\r\nStarting up Selenium server ...\r\n" | |
DISPLAY=:1 xvfb-run java -jar ~/selenium/selenium-server-standalone-2.44.0.jar |
@islamTaha12 replace these line
sudo wget http://selenium-release.storage.googleapis.com/2.44/selenium-server-standalone-2.44.0.jar
with this line:
sudo wget http://selenium-release.storage.googleapis.com/2.53/selenium-server-standalone-2.53.1..jar
and you are ready to go!
Hi @curtismcmullan
Can you help me starting selenium server on startup? It would be a great help for many. Thanks for detailed commands for installing selenium.
Thanks,
Rutvij
How chrome worked headless ?
Thanks a lot, it really helped.
Is it also possible to run xvfb-run in the background? I tried DISPLAY=:1 xvfb-run java -jar ~/selenium/selenium-server-standalone-2.44.0.jar &
.
Link for the last version (check my post date) https://selenium-release.storage.googleapis.com/3.14/selenium-server-standalone-3.14.0.jar
Please, Update this code with the latest versions :) and Thanks for your effort