lib/taza/browser.rb in taza-2.1.0 vs lib/taza/browser.rb in taza-3.0.0
- old
+ new
@@ -15,18 +15,11 @@
end
private
def self.create_watir(params)
- method = "watir_#{params[:browser]}"
- raise BrowserUnsupportedError unless self.respond_to?(method)
- watir = self.send(method,params)
- watir
- end
-
- def self.create_watir_webdriver(params)
- require 'watir-webdriver'
+ require 'watir'
Watir::Browser.new(params[:browser])
end
def self.create_selenium(params)
require 'selenium'
@@ -41,29 +34,8 @@
navigate.to params
end
end
Selenium::WebDriver.for params[:browser].to_sym
end
-
- def self.watir_firefox(params)
- require 'firewatir'
- FireWatir::Firefox.new
- end
-
- def self.watir_safari(params)
- require 'safariwatir'
- Watir::Safari.new
- end
-
- def self.watir_ie(params)
- require 'watir'
- if params[:attach]
- browser = Watir::Browser.find(:title, //)
- end
- browser || Watir::Browser.new
- end
end
-
- # We don't know how to create the browser you asked for
- class BrowserUnsupportedError < StandardError; end
end