module Selenium::WebDriver::Safari

Attributes

use_technology_preview[RW]

Public Class Methods

driver_path() click to toggle source
# File lib/selenium/webdriver/safari.rb, line 64
def driver_path
  WebDriver.logger.deprecate 'Selenium::WebDriver::Safari#driver_path',
                             'Selenium::WebDriver::Safari::Service#driver_path',
                             id: :driver_path
  Selenium::WebDriver::Safari::Service.driver_path
end
driver_path=(path) click to toggle source
# File lib/selenium/webdriver/safari.rb, line 57
def driver_path=(path)
  WebDriver.logger.deprecate 'Selenium::WebDriver::Safari#driver_path=',
                             'Selenium::WebDriver::Safari::Service#driver_path=',
                             id: :driver_path
  Selenium::WebDriver::Safari::Service.driver_path = path
end
path() click to toggle source
# File 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) click to toggle source
# File lib/selenium/webdriver/safari.rb, line 44
def path=(path)
  Platform.assert_executable(path)
  @path = path
end
technology_preview() click to toggle source
# File lib/selenium/webdriver/safari.rb, line 31
def technology_preview
  "/Applications/Safari\ Technology\ Preview.app/Contents/MacOS/safaridriver"
end
technology_preview!() click to toggle source
# File lib/selenium/webdriver/safari.rb, line 35
def technology_preview!
  Service.driver_path = technology_preview
  @use_technology_preview = true
end
technology_preview?() click to toggle source
# File lib/selenium/webdriver/safari.rb, line 40
def technology_preview?
  use_technology_preview
end