123456789_123456789_123456789_123456789_123456789_

Module: Selenium::WebDriver::Safari

Class Attribute Summary

Class Method Summary

Class Attribute Details

.path (rw)

[ GitHub ]

  
# File 'rb/lib/selenium/webdriver/safari.rb', line 49

def path
  @path ||= '/Applications/Safari.app/Contents/MacOS/Safari'
  return @path if File.file?(@path) && File.executable?(@path)
  raise Error::WebDriverError, 'Safari is only supported on Mac' unless Platform.os.mac?

  raise Error::WebDriverError, 'Unable to find Safari'
end

.path=(path) (rw)

[ GitHub ]

  
# File 'rb/lib/selenium/webdriver/safari.rb', line 44

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

.technology_preview (readonly)

[ GitHub ]

  
# File 'rb/lib/selenium/webdriver/safari.rb', line 31

def technology_preview
  '/Applications/Safari Technology Preview.app/Contents/MacOS/safaridriver'
end

.technology_preview?Boolean (readonly)

[ GitHub ]

  
# File 'rb/lib/selenium/webdriver/safari.rb', line 40

def technology_preview?
  use_technology_preview
end

.use_technology_preview (rw)

[ GitHub ]

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

attr_accessor :use_technology_preview

Class Method Details

.technology_preview!

[ GitHub ]

  
# File 'rb/lib/selenium/webdriver/safari.rb', line 35

def technology_preview!
  Service.driver_path = technology_preview
  @use_technology_preview = true
end