Module: Selenium::WebDriver::Safari

Defined in:
lib/selenium/webdriver/safari.rb,
lib/selenium/webdriver/safari/bridge.rb,
lib/selenium/webdriver/safari/server.rb,
lib/selenium/webdriver/safari/browser.rb,
lib/selenium/webdriver/safari/options.rb,
lib/selenium/webdriver/safari/extensions.rb

Defined Under Namespace

Classes: Bridge, Browser, Extensions, Options, Server

Class Method Summary collapse

Class Method Details

.pathObject



31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
# File 'lib/selenium/webdriver/safari.rb', line 31

def path
  @path ||= (
    path = case Platform.os
           when :windows
             Platform.find_in_program_files("Safari\\Safari.exe")
           when :macosx
             "/Applications/Safari.app/Contents/MacOS/Safari"
           else
             Platform.find_binary("Safari")
           end

    unless File.file?(path) && File.executable?(path)
      raise Error::WebDriverError, "unable to find the Safari executable, please set Selenium::WebDriver::Safari.path= or add it to your PATH."
    end

    path
  )
end

.path=(path) ⇒ Object



26
27
28
29
# File 'lib/selenium/webdriver/safari.rb', line 26

def path=(path)
  Platform.assert_executable(path)
  @path = path
end

.resource_pathObject



50
51
52
# File 'lib/selenium/webdriver/safari.rb', line 50

def resource_path
  @resource_path ||= Pathname.new(File.expand_path("../safari/resources", __FILE__))
end