Class: SafariBrowser
Instance Method Summary
collapse
Methods inherited from Browser
#applescript, #host, #linux?, #macos?, #open, #windows?
Instance Method Details
#setup ⇒ Object
51
52
53
|
# File 'lib/test/browser.rb', line 51
def setup
applescript('tell application "Safari" to make new document')
end
|
#supported? ⇒ Boolean
47
48
49
|
# File 'lib/test/browser.rb', line 47
def supported?
macos?
end
|
#teardown ⇒ Object
59
60
61
|
# File 'lib/test/browser.rb', line 59
def teardown
end
|
#to_s ⇒ Object
63
64
65
|
# File 'lib/test/browser.rb', line 63
def to_s
"Safari"
end
|
#visit(url) ⇒ Object
55
56
57
|
# File 'lib/test/browser.rb', line 55
def visit(url)
applescript('tell application "Safari" to set URL of front document to "' + url + '"')
end
|