Sha256: c5fac885db48dea454e1490bc570f4f0d1ea20b874bda2434c34b8ad36f690bc

Contents?: true

Size: 1.27 KB

Versions: 1

Compression:

Stored size: 1.27 KB

Contents

require 'capybara'
require 'capybara/cucumber'
require 'rspec'
require 'selenium/webdriver'
require 'testingbot/cucumber'

if ENV['TESTINGBOT_BROWSER']
	caps = {}
	caps[:browser] = ENV['TESTINGBOT_BROWSER']
	caps[:version] = ENV['TESTINGBOT_BROWSERVERSION'] || ""
	caps[:platform] = ENV['TESTINGBOT_BROWSEROS'] || :WINDOWS 

	Capybara.default_driver = :testingbot
	Capybara.register_driver :testingbot do |app|
		client = Selenium::WebDriver::Remote::Http::Default.new
			client.timeout = 120
	  	Capybara::Selenium::Driver.new(app,
		    :browser => :remote,
		    :url => "http://251ca561ab0f7557bb34c3ee3dbde285:3fc22e44f086fa036d8b01eadf66740b@hub.testingbot.com:4444/wd/hub",
		    :http_client => client,
		    :desired_capabilities => caps)
	end
else
	caps = Selenium::WebDriver::Remote::Capabilities.firefox
	caps.version = "10"  
	caps.platform = :WINDOWS 

	Capybara.default_driver = :testingbot
	Capybara.register_driver :testingbot do |app|
		client = Selenium::WebDriver::Remote::Http::Default.new
			client.timeout = 120
	  	Capybara::Selenium::Driver.new(app,
		    :browser => :remote,
		    :url => "http://251ca561ab0f7557bb34c3ee3dbde285:3fc22e44f086fa036d8b01eadf66740b@hub.testingbot.com:4444/wd/hub",
		    :http_client => client,
		    :desired_capabilities => caps)
	end
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
testingbot-0.0.9 examples/cucumber/features/support/env.rb