Module: Thoran::Selenium::WebDriver::Setup

Included in:
Selenium::WebDriver
Defined in:
lib/Thoran/Selenium/WebDriver/Setup/setup.rb

Instance Method Summary collapse

Instance Method Details

#setup(path_or_browser) ⇒ Object



27
28
29
30
31
32
33
34
35
36
# File 'lib/Thoran/Selenium/WebDriver/Setup/setup.rb', line 27

def setup(path_or_browser)
  if File.exist?(File.expand_path(path_or_browser.to_s))
    path = path_or_browser
    at(path)
    ::Selenium::WebDriver.for(selenium_browser(path))
  else
    browser = path_or_browser.to_sym.downcase
    ::Selenium::WebDriver.for(browser)
  end
end