lib/taza/browser.rb in taza-0.9.1.1 vs lib/taza/browser.rb in taza-0.9.1.2
- old
+ new
@@ -31,10 +31,21 @@
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.create_selenium_webdriver(params)
+ require 'selenium-webdriver'
+ #Small hack. :)
+ Selenium::WebDriver::Driver.class_eval do
+ def goto(params)
+ navigate.to params
+ end
+ end
+ Selenium::WebDriver.for params[:browser].to_sym
+ end
+
def self.watir_firefox(params)
require 'firewatir'
FireWatir::Firefox.new
end
@@ -44,10 +55,10 @@
end
def self.watir_ie(params)
require 'watir'
if params[:attach]
- browser = Watir::IE.find(:title, //)
+ browser = Watir::IE.find(:title, //)
end
browser || Watir::IE.new
end
end