Created
June 30, 2011 10:30
-
-
Save estahn/1055981 to your computer and use it in GitHub Desktop.
Headless Testing for Continuous Integration with Ruby and Selenium
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
# Install and run xvfb | |
apt-get install xvfb | |
Xvfb -ac :99 | |
# Get Firefox | |
wget -O firefox-5.0.tar.bz2 "http://download.mozilla.org/?product=firefox-5.0&os=linux&lang=en-US" | |
tar xfj firefox-5.0.tar.bz2 | |
mv firefox firefox-5.0 | |
# Get Selenium Server | |
wget http://selenium.googlecode.com/files/selenium-server-standalone-2.0rc3.jar | |
# Start Selenium Server | |
DISPLAY=:99 java -jar selenium-server-standalone-2.0rc3.jar -Dwebdriver.firefox.bin=<firefox path>/firefox-5.0/firefox-bin | |
# Install gem | |
gem install selenium-webdriver | |
# Test it | |
irb | |
require "selenium-webdriver" | |
driver = Selenium::WebDriver.for(:remote) | |
driver.navigate.to "http://google.com" | |
driver.title |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment