watir 4.0.0-x86-mingw32 → 4.0.1-x86-mingw32
Sign up to get free protection for your applications and to get access to all the features.
- data/lib/watir/loader.rb +27 -4
- data/lib/watir/version.rb +1 -1
- metadata +2 -2
data/lib/watir/loader.rb
CHANGED
@@ -3,11 +3,9 @@ require File.expand_path('version', File.dirname(__FILE__))
|
|
3
3
|
module Watir
|
4
4
|
class Browser
|
5
5
|
class << self
|
6
|
+
|
6
7
|
def new(browser=nil, *args)
|
7
|
-
|
8
|
-
Watir.driver = :webdriver
|
9
|
-
end
|
10
|
-
Watir.load_driver
|
8
|
+
load_driver_for browser
|
11
9
|
|
12
10
|
if Watir.driver == :webdriver
|
13
11
|
# remove this class method for WebDriver to avoid endless loop
|
@@ -17,6 +15,31 @@ module Watir
|
|
17
15
|
|
18
16
|
new browser.nil? && Watir.driver == :webdriver ? :firefox : browser, *args
|
19
17
|
end
|
18
|
+
|
19
|
+
def start(url, browser=nil, *args)
|
20
|
+
load_driver_for browser
|
21
|
+
|
22
|
+
if Watir.driver == :webdriver
|
23
|
+
start url, browser || :firefox, *args
|
24
|
+
else
|
25
|
+
start url
|
26
|
+
end
|
27
|
+
end
|
28
|
+
|
29
|
+
def method_missing(name, *args, &block)
|
30
|
+
Watir.load_driver
|
31
|
+
send name, *args, &block
|
32
|
+
end
|
33
|
+
|
34
|
+
private
|
35
|
+
|
36
|
+
def load_driver_for(browser)
|
37
|
+
if browser && browser.to_sym != :ie && Watir.driver == :classic
|
38
|
+
Watir.driver = :webdriver
|
39
|
+
end
|
40
|
+
Watir.load_driver
|
41
|
+
end
|
42
|
+
|
20
43
|
end
|
21
44
|
end
|
22
45
|
|
data/lib/watir/version.rb
CHANGED
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: watir
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 4.0.
|
4
|
+
version: 4.0.1
|
5
5
|
prerelease:
|
6
6
|
platform: x86-mingw32
|
7
7
|
authors:
|
@@ -9,7 +9,7 @@ authors:
|
|
9
9
|
autorequire:
|
10
10
|
bindir: bin
|
11
11
|
cert_chain: []
|
12
|
-
date: 2012-
|
12
|
+
date: 2012-10-21 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: commonwatir
|