Skip to content

Instantly share code, notes, and snippets.

@dimacus
Created October 22, 2014 21:37
Show Gist options
  • Save dimacus/b6f99cd0f335616e8ea4 to your computer and use it in GitHub Desktop.
Save dimacus/b6f99cd0f335616e8ea4 to your computer and use it in GitHub Desktop.
require 'rubygems'
require 'selenium-webdriver'
driver = Selenium::WebDriver.for(:remote, :url => "http://127.0.0.1:4444/wd/hub", :desired_capabilities => :firefox)
driver.get "http://seleniumhq.org"
sleep 5
driver2 = Selenium::WebDriver.for(:remote, :url => "http://127.0.0.1:4444/wd/hub", :desired_capabilities => :firefox)
10.times do
driver2.get "http://google.com"
sleep 3
end
driver2.quit
driver.quit #Both with and without Quit was used
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment