Skip to content

Instantly share code, notes, and snippets.

@testingbot
Created April 11, 2012 09:13
Show Gist options
  • Save testingbot/2358182 to your computer and use it in GitHub Desktop.
Save testingbot/2358182 to your computer and use it in GitHub Desktop.
require "rubygems"
require 'testingbot'
gem "selenium-client"
gem "selenium-webdriver"
require "selenium-webdriver"
require "selenium/client"
caps = {
:browserName => "firefox",
:platform => "WINDOWS",
:version => "11",
:api_key => "xx",
:api_secret => "xx"
}
urlhub = "http://localhost:4445/wd/hub"
client = Selenium::WebDriver::Remote::Http::Default.new
client.timeout = 120
@webdriver = Selenium::WebDriver.for :remote,:url => urlhub , :desired_capabilities => caps,:http_client => client
@webdriver.navigate.to "http://testingbot.com/"
puts @webdriver.title
@webdriver.quit
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment