taza 0.8.2 → 0.8.3
Sign up to get free protection for your applications and to get access to all the features.
- data/VERSION.yml +1 -1
- data/lib/taza/browser.rb +20 -3
- metadata +2 -2
data/VERSION.yml
CHANGED
data/lib/taza/browser.rb
CHANGED
@@ -17,9 +17,10 @@ module Taza
|
|
17
17
|
private
|
18
18
|
|
19
19
|
def self.create_watir(params)
|
20
|
-
|
21
|
-
|
22
|
-
|
20
|
+
method = "watir_#{params[:browser]}"
|
21
|
+
raise BrowserUnsupportedError unless self.respond_to?(method)
|
22
|
+
watir = self.send(method).new
|
23
|
+
watir
|
23
24
|
end
|
24
25
|
|
25
26
|
def self.create_selenium(params)
|
@@ -27,7 +28,23 @@ module Taza
|
|
27
28
|
Selenium::SeleniumDriver.new(params[:server_ip],params[:server_port],'*' + params[:browser].to_s,params[:timeout])
|
28
29
|
end
|
29
30
|
|
31
|
+
def self.watir_firefox
|
32
|
+
require 'firewatir'
|
33
|
+
FireWatir::Firefox
|
34
|
+
end
|
35
|
+
|
36
|
+
def self.watir_safari
|
37
|
+
require 'safariwatir'
|
38
|
+
Watir::Safari
|
39
|
+
end
|
40
|
+
|
41
|
+
def self.watir_ie
|
42
|
+
require 'watir'
|
43
|
+
Watir::IE
|
44
|
+
end
|
30
45
|
end
|
31
46
|
|
47
|
+
# We don't know how to create the browser you asked for
|
48
|
+
class BrowserUnsupportedError < StandardError; end
|
32
49
|
end
|
33
50
|
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: taza
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.8.
|
4
|
+
version: 0.8.3
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Adam Anderson
|
@@ -9,7 +9,7 @@ autorequire:
|
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
11
|
|
12
|
-
date: 2009-01-
|
12
|
+
date: 2009-01-26 00:00:00 -08:00
|
13
13
|
default_executable: taza
|
14
14
|
dependencies:
|
15
15
|
- !ruby/object:Gem::Dependency
|