lib/site-object/site.rb
# Can be used to open a browser for the site object if the user did not pass one in when it was
# initialized. The arguments used here get passed down to Watir when starting the browser. Example:
#  s = SomeSite.new(hash)
#  s.open_browser :watir, :firefox
Can be used to open a browser for the site object if the user did not pass one in when it was
initialized. The arguments used here get passed down to Watir when starting the browser.
Can be used to open a browser for the site object if the user did not pass one in when it was initialized . The arguments used here get passed down to Watir when starting the browser .
def open_browser(platform, browser_type, args={})
    case platform
    when :watir
      @browser = Watir::Browser.new(browser_type, args)
    when :selenium
      @browser = Selenium::WebDriver::Driver.for(browser_type, args)
    else
      raise ArgumentError "Platform argument must be either :watir or :selenium."
    end
  end
def open_browser ( platform , browser_type , args = { } ) case platform when :watir @browser = Watir :: Browser . new ( browser_type , args ) when :selenium @browser = Selenium :: WebDriver :: Driver . for ( browser_type , args ) else raise ArgumentError "Platform argument must be either :watir or :selenium." end end
Can be used to open a browser for the site object if the user did not pass one in when it was
initialized.
Can be used to open a browser for the site object if the user did not pass one in when it was initialized .
platform
<not_specific>
browser_type
<not_specific>
args
<not_specific>