lib/taza/browser.rb in scudco-taza-0.8.6 vs lib/taza/browser.rb in scudco-taza-0.8.7

- old
+ new

@@ -17,31 +17,34 @@ private def self.create_watir(params) method = "watir_#{params[:browser]}" raise BrowserUnsupportedError unless self.respond_to?(method) - watir = self.send(method).new + watir = self.send(method,params) watir end def self.create_selenium(params) require 'selenium' Selenium::SeleniumDriver.new(params[:server_ip],params[:server_port],'*' + params[:browser].to_s,params[:timeout]) end - def self.watir_firefox + def self.watir_firefox(params) require 'firewatir' - FireWatir::Firefox + FireWatir::Firefox.new end - def self.watir_safari + def self.watir_safari(params) require 'safariwatir' - Watir::Safari + Watir::Safari.new end - def self.watir_ie + def self.watir_ie(params) require 'watir' - Watir::IE + if params[:attach] + browser = Watir::IE.find(:title, //) + end + browser || Watir::IE.new end end # We don't know how to create the browser you asked for class BrowserUnsupportedError < StandardError; end