Class: SeaCucumber::SafariBrowser
- Inherits:
-
Browser
- Object
- Browser
- SeaCucumber::SafariBrowser
show all
- Defined in:
- lib/seacucumber/safari_browser.rb
Overview
TODO need to update this to support Safari on Windows
Instance Method Summary
collapse
Methods inherited from Browser
#applescript, #host, #linux?, #macos?, #open, #windows?
Instance Method Details
#setup ⇒ Object
9
10
11
|
# File 'lib/seacucumber/safari_browser.rb', line 9
def setup
applescript('tell application "Safari" to make new document')
end
|
#supported? ⇒ Boolean
5
6
7
|
# File 'lib/seacucumber/safari_browser.rb', line 5
def supported?
macos?
end
|
#teardown ⇒ Object
17
18
19
|
# File 'lib/seacucumber/safari_browser.rb', line 17
def teardown
end
|
#to_s ⇒ Object
21
22
23
|
# File 'lib/seacucumber/safari_browser.rb', line 21
def to_s
"Safari"
end
|
#visit(url) ⇒ Object
13
14
15
|
# File 'lib/seacucumber/safari_browser.rb', line 13
def visit(url)
applescript('tell application "Safari" to set URL of front document to "' + url + '"')
end
|