lib/saucelabs/sauce_browser_factory.rb
def browser_caps(browser,browser_options)
      target = (browser.to_sym if ENV['BROWSER'].nil? or ENV['browser'].empty?) || (ENV['BROWSER'].to_sym)
      browser,version,platform,device = extract_values_from(target)
      options = {}
      options.merge! browser_options
      caps = capabilities(browser,version,platform,device)
      options[:url] = url if url
      if options.include? :url
        browser = :remote
        options[:desired_capabilities] = caps
      end
      options[:http_client] = http_client if persistent_http or options.delete(:persistent_http)
      return browser,options
    end
def browser_caps(browser,browser_options)
      target = (browser.to_sym if ENV['BROWSER'].nil? or ENV['browser'].empty?) || (ENV['BROWSER'].to_sym)
      browser,version,platform,device = extract_values_from(target)
      options = {}
      options.merge! browser_options
      caps = capabilities(browser,version,platform,device)
      options[:url] = url if url
      if options.include? :url
        browser = :remote
        options[:desired_capabilities] = caps
      end
      options[:http_client] = http_client if persistent_http or options.delete(:persistent_http)
      return browser,options
    end
def browser_caps ( browser , browser_options ) target = ( browser . to_sym if ENV [ 'BROWSER' ] . nil? or ENV [ 'browser' ] . empty? ) || ( ENV [ 'BROWSER' ] . to_sym ) browser , version , platform , device = extract_values_from ( target ) options = { } options . merge! browser_options caps = capabilities ( browser , version , platform , device ) options [ :url ] = url if url if options . include? :url browser = :remote options [ :desired_capabilities ] = caps end options [ :http_client ] = http_client if persistent_http or options . delete ( :persistent_http ) return browser , options end
Returns the target and options including the capabilities

 @param  [String] the browser string passed into the method
 @param [Hash] the optional hash to specify browser options
 @return [Symbol,Hash] browser as symbol and options as Hash
Returns the target and options including the capabilities