selenium-webdriver 2.4.0 → 2.5.0

Sign up to get free protection for your applications and to get access to all the features.
data/CHANGES CHANGED
@@ -1,3 +1,13 @@
1
+ 2.5.0 (2011-08-23)
2
+ ==================
3
+
4
+ * IE: support for double click and fix for clicks close to edge of window.
5
+ * Fix for clicking links that overflow into multiple lines (#1020).
6
+ * Correct initial cursor position when typing into text fields with Firefox 6.
7
+ * Native events support for Firefox 6 on Windows and Linux.
8
+ * Fix bug in Android::Bridge when no :http_client option was passed.
9
+ * Set chrome.detach to tell chromedriver to leave browser running on exit.
10
+
1
11
  2.4.0 (2011-08-11)
2
12
  ==================
3
13
 
@@ -9,9 +9,10 @@ module Selenium
9
9
  remote_opts = {
10
10
  :url => opts.fetch(:url, DEFAULT_URL),
11
11
  :desired_capabilities => opts.fetch(:desired_capabilities, capabilities),
12
- :http_client => opts[:http_client]
13
12
  }
14
13
 
14
+ remote_opts[:http_client] = opts[:http_client] if opts.has_key?(:http_client)
15
+
15
16
  super remote_opts
16
17
  end
17
18
 
@@ -6,30 +6,8 @@ module Selenium
6
6
  class Bridge < Remote::Bridge
7
7
 
8
8
  def initialize(opts = {})
9
- http_client = opts.delete(:http_client)
10
- switches = opts.delete(:switches)
11
- native_events = opts.delete(:native_events)
12
- verbose = opts.delete(:verbose)
13
- profile = opts.delete(:profile)
14
-
15
- unless opts.empty?
16
- raise ArgumentError, "unknown option#{'s' if opts.size != 1}: #{opts.inspect}"
17
- end
18
-
19
- caps = Remote::Capabilities.chrome
20
-
21
- if switches
22
- unless switches.kind_of? Array
23
- raise ArgumentError, ":switches must be an Array of Strings"
24
- end
25
-
26
- caps.merge! 'chrome.switches' => switches.map { |e| e.to_s }
27
- end
28
-
29
- caps.merge! 'chrome.binary' => Chrome.path if Chrome.path
30
- caps.merge! 'chrome.nativeEvents' => true if native_events
31
- caps.merge! 'chrome.verbose' => true if verbose
32
- caps.merge! 'chrome.profile' => profile.as_json['zip'] if profile
9
+ http_client = opts.delete(:http_client)
10
+ caps = create_capabilities(opts)
33
11
 
34
12
  @service = Service.default_service
35
13
  @service.start
@@ -65,6 +43,36 @@ module Selenium
65
43
  @service.stop
66
44
  end
67
45
 
46
+ private
47
+
48
+ def create_capabilities(opts)
49
+ switches = opts.delete(:switches)
50
+ native_events = opts.delete(:native_events)
51
+ verbose = opts.delete(:verbose)
52
+ profile = opts.delete(:profile)
53
+ detach = opts.delete(:detach)
54
+
55
+ unless opts.empty?
56
+ raise ArgumentError, "unknown option#{'s' if opts.size != 1}: #{opts.inspect}"
57
+ end
58
+
59
+ caps = Remote::Capabilities.chrome
60
+
61
+ if switches
62
+ unless switches.kind_of? Array
63
+ raise ArgumentError, ":switches must be an Array of Strings"
64
+ end
65
+
66
+ caps.merge! 'chrome.switches' => switches.map { |e| e.to_s }
67
+ end
68
+
69
+ caps.merge! 'chrome.binary' => Chrome.path if Chrome.path
70
+ caps.merge! 'chrome.nativeEvents' => true if native_events
71
+ caps.merge! 'chrome.verbose' => true if verbose
72
+ caps.merge! 'chrome.profile' => profile.as_json['zip'] if profile
73
+ caps.merge! 'chrome.detach' => detach.nil? || !!detach
74
+ end
75
+
68
76
  end # Bridge
69
77
  end # Chrome
70
78
  end # WebDriver
@@ -8,7 +8,7 @@ module Selenium
8
8
  def initialize(host, port, timeout = 0, interval = 0.25)
9
9
  @host = host
10
10
  @port = Integer(port)
11
- @timeout = Integer(timeout)
11
+ @timeout = Float(timeout)
12
12
  @interval = interval
13
13
  end
14
14
 
@@ -281,6 +281,7 @@ module Selenium
281
281
  "extensions.update.enabled" => 'false',
282
282
  "extensions.update.notifyUser" => 'false',
283
283
  "network.manage-offline-status" => 'false',
284
+ "network.http.phishy-userpass-length" => '255',
284
285
  "network.http.max-connections-per-server" => '10',
285
286
  "prompts.tab_modal.enabled" => "false",
286
287
  "security.warn_entering_secure" => 'false',
metadata CHANGED
@@ -2,7 +2,7 @@
2
2
  name: selenium-webdriver
3
3
  version: !ruby/object:Gem::Version
4
4
  prerelease:
5
- version: 2.4.0
5
+ version: 2.5.0
6
6
  platform: ruby
7
7
  authors:
8
8
  - Jari Bakken
@@ -10,7 +10,7 @@ autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
12
 
13
- date: 2011-08-11 00:00:00 +02:00
13
+ date: 2011-08-23 00:00:00 +02:00
14
14
  default_executable:
15
15
  dependencies:
16
16
  - !ruby/object:Gem::Dependency