Module: Selenium::WebDriver::Safari
- Defined in:
- lib/selenium/webdriver/safari.rb,
lib/selenium/webdriver/safari/bridge.rb,
lib/selenium/webdriver/safari/service.rb
Defined Under Namespace
Constant Summary collapse
- MISSING_TEXT =
<<-ERROR.tr("\n", '').freeze Unable to find Apple's safaridriver which comes with Safari 10. More info at https://webkit.org/blog/6900/webdriver-support-in-safari-10/ ERROR
Class Method Summary collapse
- .driver_path ⇒ Object
- .driver_path=(path) ⇒ Object
- .path ⇒ Object
- .path=(path) ⇒ Object
- .resource_path ⇒ Object
Class Method Details
.driver_path ⇒ Object
53 54 55 56 57 |
# File 'lib/selenium/webdriver/safari.rb', line 53 def driver_path @driver_path ||= '/usr/bin/safaridriver' return @driver_path if File.file?(@driver_path) && File.executable?(@driver_path) raise Error::WebDriverError, MISSING_TEXT end |
.driver_path=(path) ⇒ Object
48 49 50 51 |
# File 'lib/selenium/webdriver/safari.rb', line 48 def driver_path=(path) Platform.assert_executable path @driver_path = path end |
.path ⇒ Object
37 38 39 40 41 42 |
# File 'lib/selenium/webdriver/safari.rb', line 37 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 == :macosx raise Error::WebDriverError, 'Unable to find Safari' end |
.path=(path) ⇒ Object
32 33 34 35 |
# File 'lib/selenium/webdriver/safari.rb', line 32 def path=(path) Platform.assert_executable(path) @path = path end |
.resource_path ⇒ Object
44 45 46 |
# File 'lib/selenium/webdriver/safari.rb', line 44 def resource_path @resource_path ||= Pathname.new(File.('../safari/resources', __FILE__)) end |