46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
|
# File 'lib/testnow.rb', line 46
def init
ENV['BROWSER'] = "firefox" if ENV['BROWSER'].nil?
case ENV['BROWSER'].downcase
when "chrome"
chrome = Chrome.new
chrome.launch_watir_chrome
when "opera"
opera = Opera.new
opera.launch_watir_opera
when "androidchrome"
ac = AndroidChrome.new
ac.launch_watir_android_chrome
when "ie"
ie = IE.new
ie.launch_watir_ie
when "edge"
edge = MicrosoftEdge.new
edge.launch_watir_edge
when "firefoxgecko","geckofirefox","firefoxnew","newfirefox","firefox"
firefox_gecko = FirefoxGecko.new
firefox_gecko.launch_watir_firefox_gecko
when "phantomjs"
phantomjs = PhantomJS.new
phantomjs.launch_watir_phantomjs
when "chromemobile","mobilechrome"
chrome = Chrome.new
chrome.launch_watir_chrome_mobile
when "firefoxold","oldfirefox"
ff = Firefox.new
ff.launch_watir_firefox
end
end
|