lib/testnow.rb in testnow-0.0.8 vs lib/testnow.rb in testnow-0.0.9

- old
+ new

@@ -2,56 +2,68 @@ require 'testnow/opera' require 'testnow/firefox' require 'testnow/android' require 'testnow/android_chrome' require 'testnow/ie' +require 'testnow/edge' module TestNow - def init - ENV['BROWSER'] = "firefox" if ENV['BROWSER'].nil? - case ENV['BROWSER'].downcase - when "chrome" - chrome = Chrome.new - chrome.launch_driver_chrome - when "android" - TestNow.launch_driver_android - when "opera" - opera = Opera.new - opera.launch_driver_opera - when "androidchrome" - ac = AndroidChrome.new - ac.launch_driver_android_chrome - when "ie" - ie = IE.new - ie.launch_driver_ie - else - ff = Firefox.new - ff.launch_driver_firefox - end - end - - module Watir - def init - ENV['BROWSER'] = "firefox" if ENV['BROWSER'].nil? - case ENV['BROWSER'].downcase + def init + ENV['BROWSER'] = "firefox" if ENV['BROWSER'].nil? + case ENV['BROWSER'].downcase when "chrome" chrome = Chrome.new - chrome.launch_watir_chrome + chrome.launch_driver_chrome when "android" - TestNow.launch_watir_android + puts "Coming Soon!!\n" + puts "Apologies for inconvenience...\n\n" when "opera" opera = Opera.new - opera.launch_watir_opera + opera.launch_driver_opera when "androidchrome" ac = AndroidChrome.new - ac.launch_watir_android_chrome + ac.launch_driver_android_chrome when "ie" ie = IE.new - ie.launch_watir_ie + ie.launch_driver_ie + when "edge" + edge = MicrosoftEdge.new + edge.launch_driver_edge + when "phantomjs" + puts "Coming Soon!!\n" + puts "Apologies for inconvenience...\n\n" else ff = Firefox.new - ff.launch_watir_firefox + ff.launch_driver_firefox + end + end + + module Watir + def init + ENV['BROWSER'] = "firefox" if ENV['BROWSER'].nil? + case ENV['BROWSER'].downcase + when "chrome" + chrome = Chrome.new + chrome.launch_watir_chrome + when "android" + puts "Coming Soon!!\n" + puts "Apologies for inconvenience...\n\n" + 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 + else + ff = Firefox.new + ff.launch_watir_firefox end end end end