module SauceLabs

Public Class Methods

conf() { |factory| ... } click to toggle source

Yields to Factory object if parameters are set using conf

@return [Object] browser session

# File lib/saucelabs.rb, line 41
def self.conf
  yield factory
end
selenium_driver(browser = :firefox, browser_options={}) click to toggle source

Creates a Selenium driver session and returns the driver object

@example SauceLabs.selenium_driver(browser = :chrome, browser_options = {}) @param [String] the browser string passed into the method @param [Hash] the optional hash to specify browser options @return [Object] browser session

# File lib/saucelabs.rb, line 31
def self.selenium_driver(browser = :firefox, browser_options={})
  factory.selenium_driver(browser,browser_options)
end
watir_browser(browser = :firefox, browser_options={}) click to toggle source

Creates a watir browser session and returns the browser object

@example SauceLabs.watir_browser(browser = :chrome, browser_options = {}) @param [String] the browser string passed into the method @param [Hash] the optional hash to specify browser options @return [Object] browser session

# File lib/saucelabs.rb, line 17
def self.watir_browser(browser = :firefox, browser_options={})
  factory.watir_browser(browser,browser_options)
end

Private Class Methods

factory() click to toggle source
# File lib/saucelabs.rb, line 47
def self.factory
  @factory ||= SauceBrowserFactory.new
end