Class: SeaCucumber::Browser
- Inherits:
-
Object
- Object
- SeaCucumber::Browser
show all
- Defined in:
- lib/seacucumber/browser.rb
Instance Method Summary
collapse
Instance Method Details
#applescript(script) ⇒ Object
32
33
34
35
|
# File 'lib/seacucumber/browser.rb', line 32
def applescript(script)
raise "Can't run AppleScript on #{host}" unless macos?
system "osascript -e '#{script}' 2>&1 >/dev/null"
end
|
#host ⇒ Object
16
17
18
|
# File 'lib/seacucumber/browser.rb', line 16
def host
Config::CONFIG['host']
end
|
#linux? ⇒ Boolean
28
29
30
|
# File 'lib/seacucumber/browser.rb', line 28
def linux?
host.include?('linux')
end
|
#macos? ⇒ Boolean
20
21
22
|
# File 'lib/seacucumber/browser.rb', line 20
def macos?
host.include?('darwin')
end
|
#open(url) ⇒ Object
12
|
# File 'lib/seacucumber/browser.rb', line 12
def open(url); end
|
#setup ⇒ Object
10
|
# File 'lib/seacucumber/browser.rb', line 10
def setup; end
|
#supported? ⇒ Boolean
6
7
8
|
# File 'lib/seacucumber/browser.rb', line 6
def supported?
true
end
|
#teardown ⇒ Object
14
|
# File 'lib/seacucumber/browser.rb', line 14
def teardown; end
|
#windows? ⇒ Boolean
24
25
26
|
# File 'lib/seacucumber/browser.rb', line 24
def windows?
host.include?('mswin')
end
|