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

- old
+ new

@@ -1,29 +1,60 @@ -require 'selenium-webdriver' require 'testnow/chrome' require 'testnow/opera' require 'testnow/firefox' require 'testnow/android' require 'testnow/android_chrome' -require 'testnow/internet_explorer' +require 'testnow/ie' module TestNow def init ENV['BROWSER'] = "firefox" if ENV['BROWSER'].nil? case ENV['BROWSER'].downcase - when "chrome" - TestNow.launch_driver_chrome - when "android" - TestNow.launch_driver_android - when "opera" - TestNow.launch_driver_opera - when "androidchrome" - TestNow.launch_driver_android_chrome - when "ie" - TestNow.launch_driver_ie - else - TestNow.launch_driver_firefox - end - end + 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 -end \ No newline at end of file + 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" + TestNow.launch_watir_android + 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 + else + ff = Firefox.new + ff.launch_watir_firefox + end + end + end + +end + +