selenium-webdriver 4.0.0.rc3 → 4.0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/CHANGES +13 -0
- data/README.md +1 -1
- data/lib/selenium/webdriver/common/driver_extensions/has_network_conditions.rb +9 -0
- data/lib/selenium/webdriver/common/socket_poller.rb +30 -19
- data/lib/selenium/webdriver/firefox/options.rb +4 -0
- data/lib/selenium/webdriver/remote/bridge.rb +1 -1
- data/lib/selenium/webdriver/version.rb +1 -1
- data/selenium-webdriver.gemspec +2 -2
- metadata +9 -3
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: c06a2d4e78b10cc31c89baf7ac72014ca43bf4425b0825ede55d942ef90ae47a
|
4
|
+
data.tar.gz: f3d005b5469d38ab07c6a35a032c65b69f97c54ecbd648bbaf5217f43e1a9457
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: dba83257a6a44f2a68fdea7f7c7ae30b2d27802407d22b42bd4262b3ba8a71be00b90de4a1850428a208392ce6ecc63db20b30af8b2b14d910d5a7c20be9c32e
|
7
|
+
data.tar.gz: f9bf4b3098e9e9b5487c766e33ccdebda51f4854f3aaf896af12b26875644ab691530700af80d84fc15b73369e27742568aba375800975da9c81fc8e46beeb9d
|
data/CHANGES
CHANGED
@@ -1,3 +1,16 @@
|
|
1
|
+
4.0.0 (2021-10-13)
|
2
|
+
=========================
|
3
|
+
|
4
|
+
Ruby:
|
5
|
+
* Updated minimum required Ruby version to 2.6
|
6
|
+
* Updated minimum required rexml gem version due to vulnerability
|
7
|
+
|
8
|
+
Chrome:
|
9
|
+
* Added default values for Network Conditions so no longer need to specify everything
|
10
|
+
|
11
|
+
Firefox:
|
12
|
+
* Fixed bug where Firefox prefs were converting snake case to camel case
|
13
|
+
|
1
14
|
4.0.0.rc3 (2021-10-08)
|
2
15
|
=========================
|
3
16
|
|
data/README.md
CHANGED
@@ -38,10 +38,19 @@ module Selenium
|
|
38
38
|
# @param [Hash] conditions
|
39
39
|
# @option conditions [Integer] :latency
|
40
40
|
# @option conditions [Integer] :throughput
|
41
|
+
# @option conditions [Integer] :upload_throughput
|
42
|
+
# @option conditions [Integer] :download_throughput
|
41
43
|
# @option conditions [Boolean] :offline
|
42
44
|
#
|
43
45
|
|
44
46
|
def network_conditions=(conditions)
|
47
|
+
conditions[:latency] ||= 0
|
48
|
+
unless conditions.key?(:throughput)
|
49
|
+
conditions[:download_throughput] ||= -1
|
50
|
+
conditions[:upload_throughput] ||= -1
|
51
|
+
end
|
52
|
+
conditions[:offline] = false unless conditions.key?(:offline)
|
53
|
+
|
45
54
|
@bridge.network_conditions = conditions
|
46
55
|
end
|
47
56
|
|
@@ -65,26 +65,37 @@ module Selenium
|
|
65
65
|
arr << Errno::EALREADY if Platform.wsl?
|
66
66
|
}.freeze
|
67
67
|
|
68
|
-
|
69
|
-
|
70
|
-
|
71
|
-
|
72
|
-
|
73
|
-
|
74
|
-
|
75
|
-
|
76
|
-
|
77
|
-
|
78
|
-
|
79
|
-
|
68
|
+
if Platform.jruby?
|
69
|
+
# we use a plain TCPSocket here since JRuby has issues closing socket
|
70
|
+
# see https://github.com/jruby/jruby/issues/5709
|
71
|
+
def listening?
|
72
|
+
TCPSocket.new(@host, @port).close
|
73
|
+
true
|
74
|
+
rescue *NOT_CONNECTED_ERRORS
|
75
|
+
false
|
76
|
+
end
|
77
|
+
else
|
78
|
+
def listening?
|
79
|
+
addr = Socket.getaddrinfo(@host, @port, Socket::AF_INET, Socket::SOCK_STREAM)
|
80
|
+
sock = Socket.new(Socket::AF_INET, Socket::SOCK_STREAM, 0)
|
81
|
+
sockaddr = Socket.pack_sockaddr_in(@port, addr[0][3])
|
82
|
+
|
83
|
+
begin
|
84
|
+
sock.connect_nonblock sockaddr
|
85
|
+
rescue Errno::EINPROGRESS
|
86
|
+
retry if socket_writable?(sock) && conn_completed?(sock)
|
87
|
+
raise Errno::ECONNREFUSED
|
88
|
+
rescue *CONNECTED_ERRORS
|
89
|
+
# yay!
|
90
|
+
end
|
91
|
+
|
92
|
+
sock.close
|
93
|
+
true
|
94
|
+
rescue *NOT_CONNECTED_ERRORS
|
95
|
+
sock&.close
|
96
|
+
WebDriver.logger.debug("polling for socket on #{[@host, @port].inspect}")
|
97
|
+
false
|
80
98
|
end
|
81
|
-
|
82
|
-
sock.close
|
83
|
-
true
|
84
|
-
rescue *NOT_CONNECTED_ERRORS
|
85
|
-
sock&.close
|
86
|
-
WebDriver.logger.debug("polling for socket on #{[@host, @port].inspect}")
|
87
|
-
false
|
88
99
|
end
|
89
100
|
|
90
101
|
def socket_writable?(sock)
|
@@ -657,7 +657,7 @@ module Selenium
|
|
657
657
|
# @see https://mathiasbynens.be/notes/css-escapes
|
658
658
|
def escape_css(string)
|
659
659
|
string = string.gsub(ESCAPE_CSS_REGEXP) { |match| "\\#{match}" }
|
660
|
-
string = "\\#{UNICODE_CODE_POINT + Integer(string[0])} #{string[1
|
660
|
+
string = "\\#{UNICODE_CODE_POINT + Integer(string[0])} #{string[1..]}" if string[0]&.match?(/[[:digit:]]/)
|
661
661
|
|
662
662
|
string
|
663
663
|
end
|
data/selenium-webdriver.gemspec
CHANGED
@@ -28,7 +28,7 @@ Gem::Specification.new do |s|
|
|
28
28
|
}
|
29
29
|
|
30
30
|
s.required_rubygems_version = Gem::Requirement.new('> 1.3.1') if s.respond_to? :required_rubygems_version=
|
31
|
-
s.required_ruby_version = Gem::Requirement.new('>= 2.
|
31
|
+
s.required_ruby_version = Gem::Requirement.new('>= 2.6')
|
32
32
|
|
33
33
|
s.files = [
|
34
34
|
'CHANGES',
|
@@ -45,7 +45,7 @@ Gem::Specification.new do |s|
|
|
45
45
|
s.require_paths = ['lib']
|
46
46
|
|
47
47
|
s.add_runtime_dependency 'childprocess', ['>= 0.5', '< 5.0']
|
48
|
-
s.add_runtime_dependency 'rexml', ['~> 3.2']
|
48
|
+
s.add_runtime_dependency 'rexml', ['~> 3.2', '>= 3.2.5']
|
49
49
|
s.add_runtime_dependency 'rubyzip', ['>= 1.2.2']
|
50
50
|
|
51
51
|
# childprocess requires ffi on windows but doesn't declare it in its dependencies
|
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: 4.0.0
|
4
|
+
version: 4.0.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Alex Rodionov
|
@@ -10,7 +10,7 @@ authors:
|
|
10
10
|
autorequire:
|
11
11
|
bindir: bin
|
12
12
|
cert_chain: []
|
13
|
-
date: 2021-10-
|
13
|
+
date: 2021-10-13 00:00:00.000000000 Z
|
14
14
|
dependencies:
|
15
15
|
- !ruby/object:Gem::Dependency
|
16
16
|
name: childprocess
|
@@ -39,6 +39,9 @@ dependencies:
|
|
39
39
|
- - "~>"
|
40
40
|
- !ruby/object:Gem::Version
|
41
41
|
version: '3.2'
|
42
|
+
- - ">="
|
43
|
+
- !ruby/object:Gem::Version
|
44
|
+
version: 3.2.5
|
42
45
|
type: :runtime
|
43
46
|
prerelease: false
|
44
47
|
version_requirements: !ruby/object:Gem::Requirement
|
@@ -46,6 +49,9 @@ dependencies:
|
|
46
49
|
- - "~>"
|
47
50
|
- !ruby/object:Gem::Version
|
48
51
|
version: '3.2'
|
52
|
+
- - ">="
|
53
|
+
- !ruby/object:Gem::Version
|
54
|
+
version: 3.2.5
|
49
55
|
- !ruby/object:Gem::Dependency
|
50
56
|
name: rubyzip
|
51
57
|
requirement: !ruby/object:Gem::Requirement
|
@@ -380,7 +386,7 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
380
386
|
requirements:
|
381
387
|
- - ">="
|
382
388
|
- !ruby/object:Gem::Version
|
383
|
-
version: '2.
|
389
|
+
version: '2.6'
|
384
390
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
385
391
|
requirements:
|
386
392
|
- - ">"
|