8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
|
# File 'lib/saucelabs_adapter/test_unit_adapter.rb', line 8
def configure_selenium
puts "[saucelabs-adapter] configuring selenium..." if ENV['SAUCELABS_ADAPTER_DEBUG'] && ENV['SAUCELABS_ADAPTER_DEBUG'].to_i >= 2
selenium_config = SaucelabsAdapter::SeleniumConfig.new(ENV['SELENIUM_ENV'])
if defined?(Polonium)
polonium_config = Polonium::Configuration.instance
selenium_config.configure_polonium(polonium_config)
elsif defined?(Webrat)
webrat_config = Webrat.configuration
selenium_config.configure_webrat(webrat_config)
else
puts "[saucelabs-adapter] Starting browser session"
@browser = selenium_config.create_driver
@browser.start_new_browser_session :trustAllSSLCertificates => false
end
end
|