selenium-webdriver 3.9.0 → 3.10.0

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 4de4171f1c01dacf1c8f143f742fe0fee1b011b9
4
- data.tar.gz: 970370fe12cfc9cb0a5c241521c96f8cca968c52
3
+ metadata.gz: 22b31cf2cb36c46da31ae93a2290628edfd87256
4
+ data.tar.gz: fc64c32e332e064639571c584bfb8b2f298b2619
5
5
  SHA512:
6
- metadata.gz: 23b922cf527ea641ea9ee4941fb2f39cdea614b41a025a88730a4e104c24b6d4de316e7f13d262c2b31952cf5336c223b5e2923e987e13f48c2fd40ec6fa1c58
7
- data.tar.gz: b9f234b46090ae9674fc315b1248a56bb5a1ad806ad77d707713d95b133ea6d42b5f9f13348d3e71cab08575b76163b27a05d870057797acec2e01b22a52a756
6
+ metadata.gz: 93b64caa71decb95dfeb5d0492a62dcaa00d34ac05f333f39cc0c30e0f3a8a7dde8fe63fbb0b8c3b2b2968c82404c6cf31b0499a4df2bb6118c4b333d2888171
7
+ data.tar.gz: 2b6cee2af716ebcabf935d2236f35af38dbbf0607caf86865aadfd0c51a714caa8f359a232701937b600d0c8bc01539c2c5064cbb3e89ebc215ba2dcbf5ba253
data/CHANGES CHANGED
@@ -1,3 +1,18 @@
1
+ 3.10.0 (Unreleased)
2
+ ===================
3
+
4
+ Ruby:
5
+ * Added Errno::EAFNOSUPPORT to the list of ignored errors when finding port (thanks @jtarchie)
6
+ * Added automatic conversion of noProxy to the list of strings as required
7
+ by W3C WebDriver Specification (issue #5004)
8
+
9
+ Chrome:
10
+ * Added Chrome::Options#headless! shortcut to enable headless mode (thanks @pulkitsharma07)
11
+
12
+ IE:
13
+ * Added support for getting local storage using Driver#local_storage
14
+ * Added support for getting session storage using Driver#session_storage
15
+
1
16
  3.9.0 (2018-02-06)
2
17
  ==================
3
18
 
@@ -20,6 +20,7 @@ require 'tmpdir'
20
20
  require 'fileutils'
21
21
  require 'date'
22
22
  require 'json'
23
+ require 'set'
23
24
 
24
25
  require 'selenium/webdriver/common'
25
26
  require 'selenium/webdriver/atoms'
@@ -39,7 +39,7 @@ module Selenium
39
39
  #
40
40
 
41
41
  def initialize(**opts)
42
- @args = opts.delete(:args) || []
42
+ @args = Set.new(opts.delete(:args) || [])
43
43
  @binary = opts.delete(:binary) || Chrome.path
44
44
  @prefs = opts.delete(:prefs) || {}
45
45
  @extensions = opts.delete(:extensions) || []
@@ -122,6 +122,21 @@ module Selenium
122
122
  prefs[name] = value
123
123
  end
124
124
 
125
+ #
126
+ # Run Chrome in headless mode.
127
+ #
128
+ # @example Enable headless mode
129
+ # options = Selenium::WebDriver::Chrome::Options.new
130
+ # options.headless!
131
+ #
132
+
133
+ def headless!
134
+ add_argument '--headless'
135
+
136
+ # https://bugs.chromium.org/p/chromium/issues/detail?id=737678#c1
137
+ add_argument '--disable-gpu' if WebDriver::Platform.windows?
138
+ end
139
+
125
140
  #
126
141
  # Add an emulation device name
127
142
  #
@@ -156,7 +171,7 @@ module Selenium
156
171
 
157
172
  opts = @options
158
173
  opts[:binary] = @binary if @binary
159
- opts[:args] = @args if @args.any?
174
+ opts[:args] = @args.to_a if @args.any?
160
175
  opts[:extensions] = extensions if extensions.any?
161
176
  opts[:mobileEmulation] = @emulation unless @emulation.empty?
162
177
  opts[:prefs] = @prefs unless @prefs.empty?
@@ -36,7 +36,7 @@ module Selenium
36
36
  port
37
37
  end
38
38
 
39
- IGNORED_ERRORS = [Errno::EADDRNOTAVAIL]
39
+ IGNORED_ERRORS = [Errno::EADDRNOTAVAIL, Errno::EAFNOSUPPORT]
40
40
  IGNORED_ERRORS << Errno::EBADF if Platform.cygwin?
41
41
  IGNORED_ERRORS << Errno::EACCES if Platform.windows?
42
42
  IGNORED_ERRORS.freeze
@@ -41,7 +41,7 @@ module Selenium
41
41
  #
42
42
 
43
43
  def initialize(**opts)
44
- @args = opts.delete(:args) || []
44
+ @args = Set.new(opts.delete(:args) || [])
45
45
  @binary = opts.delete(:binary)
46
46
  @profile = opts.delete(:profile)
47
47
  @log_level = opts.delete(:log_level)
@@ -136,7 +136,7 @@ module Selenium
136
136
  opts = @options
137
137
 
138
138
  opts[:profile] = @profile.encoded if @profile
139
- opts[:args] = @args if @args.any?
139
+ opts[:args] = @args.to_a if @args.any?
140
140
  opts[:binary] = @binary if @binary
141
141
  opts[:prefs] = @prefs unless @prefs.empty?
142
142
  opts[:log] = {level: @log_level} if @log_level
@@ -26,6 +26,7 @@ module Selenium
26
26
  #
27
27
 
28
28
  class Driver < WebDriver::Driver
29
+ include DriverExtensions::HasWebStorage
29
30
  include DriverExtensions::TakesScreenshot
30
31
 
31
32
  def initialize(opts = {})
@@ -84,7 +84,7 @@ module Selenium
84
84
  #
85
85
 
86
86
  def initialize(**opts)
87
- @args = opts.delete(:args) || []
87
+ @args = Set.new(opts.delete(:args) || [])
88
88
  @options = opts
89
89
  @options[:native_events] ||= true
90
90
  end
@@ -125,7 +125,7 @@ module Selenium
125
125
  capability_value = @options.delete(capability_alias)
126
126
  opts[capability_name] = capability_value unless capability_value.nil?
127
127
  end
128
- opts['ie.browserCommandLineSwitches'] = @args.join(' ') if @args.any?
128
+ opts['ie.browserCommandLineSwitches'] = @args.to_a.join(' ') if @args.any?
129
129
  opts.merge!(@options)
130
130
 
131
131
  {KEY => opts}
@@ -249,6 +249,9 @@ module Selenium
249
249
  if value
250
250
  hash['proxy'] = value.as_json
251
251
  hash['proxy']['proxyType'] &&= hash['proxy']['proxyType'].downcase
252
+ if hash['proxy']['noProxy'].is_a?(String)
253
+ hash['proxy']['noProxy'] = hash['proxy']['noProxy'].split(', ')
254
+ end
252
255
  end
253
256
  when String, :firefox_binary
254
257
  hash[key.to_s] = value
@@ -3,7 +3,7 @@ raise "cwd must be #{root} when reading gemspec" if root != Dir.pwd
3
3
 
4
4
  Gem::Specification.new do |s|
5
5
  s.name = 'selenium-webdriver'
6
- s.version = '3.9.0'
6
+ s.version = '3.10.0'
7
7
 
8
8
  s.authors = ['Alex Rodionov', 'Titus Fortner']
9
9
  s.email = ['p0deje@gmail.com', 'titusfortner@gmail.com']
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: selenium-webdriver
3
3
  version: !ruby/object:Gem::Version
4
- version: 3.9.0
4
+ version: 3.10.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Alex Rodionov
@@ -9,7 +9,7 @@ authors:
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2018-02-06 00:00:00.000000000 Z
12
+ date: 2018-03-02 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  requirement: !ruby/object:Gem::Requirement