watir 4.0.0 → 4.0.1

Sign up to get free protection for your applications and to get access to all the features.
@@ -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
- if browser && browser.to_sym != :ie && Watir.driver == :classic
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
 
@@ -1,3 +1,3 @@
1
1
  module Watir
2
- BUNDLE_VERSION = '4.0.0'
2
+ BUNDLE_VERSION = '4.0.1'
3
3
  end
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.0
4
+ version: 4.0.1
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors:
@@ -9,7 +9,7 @@ authors:
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2012-09-30 00:00:00.000000000 Z
12
+ date: 2012-10-21 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: commonwatir