Skip to content

Instantly share code, notes, and snippets.

@chumster
Created August 2, 2013 19:09
Show Gist options
  • Save chumster/6142516 to your computer and use it in GitHub Desktop.
Save chumster/6142516 to your computer and use it in GitHub Desktop.
selenium-server-standalone on ubuntu
apt-get update
apt-get install sudo
Fonts and Headless X11 magic is here
sudo apt-get -y install xvfb\
x11-xkb-utils\
xfonts-100dpi xfonts-75dpi xfonts-scalable xfonts-cyrillic\
xserver-xorg-core
sudo apt-get install openjdk-6-jre # assuming this to be ok…prob so
sudo apt-get install firefox
cd ~
mkdir downloads
cd downloads
wget http://selenium.googlecode.com/files/selenium-server-standalone-2.33.0.jar # from here: http://docs.seleniumhq.org/download/
useful interactive tutorial to make sure the selenium server works
http://dionysus.uraganov.net/software/how-to-install-selenium-server-with-firefox-on-ubuntu-11-10/
# init Xvfb
Xvfb -fp /usr/share/fonts/X11/misc/ :22 -screen 0 1024x768x16 2>&1 &
export DISPLAY=:22
# open server in interactive mode …. by default is listening on port 4444 on the container
java -jar selenium-server-standalone-2.33.0.jar -interactive -singleWindow
# init session
cmd=getNewBrowserSession&1=*firefox /usr/bin/firefox&2=http://www.google.com
# perform command
cmd=open&1=http://www.google.com
# Exit interactive mode
quit
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment