selenium-webdriver 4.1.0 → 4.2.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/CHANGES +46 -1
- data/LICENSE +1 -1
- data/NOTICE +1 -1
- data/lib/selenium/server.rb +14 -9
- data/lib/selenium/webdriver/bidi/session.rb +38 -0
- data/lib/selenium/webdriver/bidi.rb +55 -0
- data/lib/selenium/webdriver/chrome/features.rb +5 -0
- data/lib/selenium/webdriver/chrome/options.rb +19 -19
- data/lib/selenium/webdriver/common/action_builder.rb +108 -21
- data/lib/selenium/webdriver/common/driver.rb +2 -2
- data/lib/selenium/webdriver/common/driver_extensions/has_bidi.rb +38 -0
- data/lib/selenium/webdriver/common/driver_extensions/has_casting.rb +10 -0
- data/lib/selenium/webdriver/common/driver_extensions/has_context.rb +1 -2
- data/lib/selenium/webdriver/common/driver_extensions/has_log_events.rb +1 -1
- data/lib/selenium/webdriver/common/driver_extensions/has_pinned_scripts.rb +1 -1
- data/lib/selenium/webdriver/common/element.rb +1 -1
- data/lib/selenium/webdriver/common/error.rb +1 -1
- data/lib/selenium/webdriver/common/interactions/input_device.rb +10 -4
- data/lib/selenium/webdriver/common/interactions/interaction.rb +12 -25
- data/lib/selenium/webdriver/common/interactions/interactions.rb +24 -4
- data/lib/selenium/webdriver/common/interactions/key_actions.rb +5 -1
- data/lib/selenium/webdriver/common/interactions/key_input.rb +11 -27
- data/lib/selenium/webdriver/common/interactions/none_input.rb +10 -8
- data/lib/selenium/webdriver/common/interactions/pause.rb +49 -0
- data/lib/selenium/webdriver/common/interactions/pointer_actions.rb +49 -43
- data/lib/selenium/webdriver/common/interactions/pointer_cancel.rb +45 -0
- data/lib/selenium/webdriver/common/interactions/pointer_event_properties.rb +63 -0
- data/lib/selenium/webdriver/common/interactions/pointer_input.rb +15 -84
- data/lib/selenium/webdriver/common/interactions/pointer_move.rb +60 -0
- data/lib/selenium/webdriver/common/interactions/pointer_press.rb +85 -0
- data/lib/selenium/webdriver/common/interactions/scroll.rb +57 -0
- data/lib/selenium/webdriver/common/interactions/scroll_origin.rb +48 -0
- data/lib/selenium/webdriver/common/interactions/typing_interaction.rb +54 -0
- data/lib/selenium/webdriver/common/interactions/wheel_actions.rb +113 -0
- data/lib/selenium/webdriver/common/interactions/wheel_input.rb +42 -0
- data/lib/selenium/webdriver/common/keys.rb +1 -0
- data/lib/selenium/webdriver/common/platform.rb +4 -4
- data/lib/selenium/webdriver/common/search_context.rb +0 -6
- data/lib/selenium/webdriver/common/service_manager.rb +2 -3
- data/lib/selenium/webdriver/common/shadow_root.rb +1 -1
- data/lib/selenium/webdriver/common/socket_poller.rb +1 -1
- data/lib/selenium/webdriver/common/websocket_connection.rb +149 -0
- data/lib/selenium/webdriver/common.rb +14 -2
- data/lib/selenium/webdriver/devtools/request.rb +1 -1
- data/lib/selenium/webdriver/devtools/response.rb +1 -1
- data/lib/selenium/webdriver/devtools.rb +5 -112
- data/lib/selenium/webdriver/edge/features.rb +1 -0
- data/lib/selenium/webdriver/firefox/driver.rb +1 -0
- data/lib/selenium/webdriver/firefox/features.rb +2 -5
- data/lib/selenium/webdriver/firefox/options.rb +3 -1
- data/lib/selenium/webdriver/firefox/profile.rb +1 -5
- data/lib/selenium/webdriver/firefox/util.rb +46 -0
- data/lib/selenium/webdriver/firefox.rb +1 -0
- data/lib/selenium/webdriver/remote/bridge.rb +21 -19
- data/lib/selenium/webdriver/remote/commands.rb +0 -5
- data/lib/selenium/webdriver/remote/http/default.rb +6 -12
- data/lib/selenium/webdriver/remote/response.rb +2 -2
- data/lib/selenium/webdriver/support/cdp_client_generator.rb +4 -4
- data/lib/selenium/webdriver/support/color.rb +7 -7
- data/lib/selenium/webdriver/support/guards/guard_condition.rb +1 -1
- data/lib/selenium/webdriver/support/guards.rb +1 -1
- data/lib/selenium/webdriver/version.rb +1 -1
- data/lib/selenium/webdriver.rb +1 -0
- data/selenium-webdriver.gemspec +7 -4
- metadata +55 -5
@@ -44,8 +44,8 @@ module Selenium
|
|
44
44
|
|
45
45
|
FileUtils.mkdir_p(@output_dir)
|
46
46
|
|
47
|
-
browser_protocol[:domains].each(
|
48
|
-
js_protocol[:domains].each(
|
47
|
+
browser_protocol[:domains].each { |domain| process_domain(domain) }
|
48
|
+
js_protocol[:domains].each { |domain| process_domain(domain) }
|
49
49
|
require_file
|
50
50
|
end
|
51
51
|
|
@@ -79,7 +79,7 @@ module Selenium
|
|
79
79
|
end
|
80
80
|
|
81
81
|
def remove_empty_lines(string)
|
82
|
-
string.split("\n").
|
82
|
+
string.split("\n").grep_v(/^\s+$/).join("\n")
|
83
83
|
end
|
84
84
|
|
85
85
|
def require_file
|
@@ -88,7 +88,7 @@ module Selenium
|
|
88
88
|
# rubocop:enable Lint/InterpolationCheck
|
89
89
|
|
90
90
|
require_all = "Dir.glob(\"#{dynamic_location}/#{@version}/*\", &method(:require))"
|
91
|
-
File.
|
91
|
+
File.write(@loader_path, require_all)
|
92
92
|
end
|
93
93
|
end
|
94
94
|
end
|
@@ -83,12 +83,12 @@ module Selenium
|
|
83
83
|
g = r
|
84
84
|
b = r
|
85
85
|
else
|
86
|
-
luminocity2 = l < 0.5 ? l * (1 + s) : l + s - l * s
|
87
|
-
luminocity1 = 2 * l - luminocity2
|
86
|
+
luminocity2 = l < 0.5 ? l * (1 + s) : l + s - (l * s)
|
87
|
+
luminocity1 = (2 * l) - luminocity2
|
88
88
|
|
89
|
-
r = hue_to_rgb(luminocity1, luminocity2, h + 1.0 / 3.0)
|
89
|
+
r = hue_to_rgb(luminocity1, luminocity2, h + (1.0 / 3.0))
|
90
90
|
g = hue_to_rgb(luminocity1, luminocity2, h)
|
91
|
-
b = hue_to_rgb(luminocity1, luminocity2, h - 1.0 / 3.0)
|
91
|
+
b = hue_to_rgb(luminocity1, luminocity2, h - (1.0 / 3.0))
|
92
92
|
end
|
93
93
|
|
94
94
|
new (r * 255).round, (g * 255).round, (b * 255).round, a
|
@@ -99,11 +99,11 @@ module Selenium
|
|
99
99
|
hue -= 1 if hue > 1.0
|
100
100
|
|
101
101
|
if hue < 1.0 / 6.0
|
102
|
-
(lum1 + (lum2 - lum1) * 6.0 * hue)
|
102
|
+
(lum1 + ((lum2 - lum1) * 6.0 * hue))
|
103
103
|
elsif hue < 1.0 / 2.0
|
104
104
|
lum2
|
105
105
|
elsif hue < 2.0 / 3.0
|
106
|
-
lum1 + (lum2 - lum1) * ((2.0 / 3.0) - hue) * 6.0
|
106
|
+
lum1 + ((lum2 - lum1) * ((2.0 / 3.0) - hue) * 6.0)
|
107
107
|
else
|
108
108
|
lum1
|
109
109
|
end
|
@@ -125,7 +125,7 @@ module Selenium
|
|
125
125
|
alias_method :eql?, :==
|
126
126
|
|
127
127
|
def hash
|
128
|
-
[red, green, blue, alpha
|
128
|
+
[red, green, blue, alpha, self.class].hash
|
129
129
|
end
|
130
130
|
|
131
131
|
def rgb
|
@@ -48,7 +48,7 @@ module Selenium
|
|
48
48
|
def disposition
|
49
49
|
if !skipping_guard.nil?
|
50
50
|
[:skip, skipping_guard.message]
|
51
|
-
elsif !pending_guard.nil? && ENV
|
51
|
+
elsif !pending_guard.nil? && ENV.fetch('SKIP_PENDING', nil)
|
52
52
|
[:skip, pending_guard.message]
|
53
53
|
elsif !pending_guard.nil?
|
54
54
|
[:pending, pending_guard.message]
|
data/lib/selenium/webdriver.rb
CHANGED
@@ -36,6 +36,7 @@ module Selenium
|
|
36
36
|
Rectangle = Struct.new(:x, :y, :width, :height)
|
37
37
|
Location = Struct.new(:latitude, :longitude, :altitude)
|
38
38
|
|
39
|
+
autoload :BiDi, 'selenium/webdriver/bidi'
|
39
40
|
autoload :Chrome, 'selenium/webdriver/chrome'
|
40
41
|
autoload :DevTools, 'selenium/webdriver/devtools'
|
41
42
|
autoload :Edge, 'selenium/webdriver/edge'
|
data/selenium-webdriver.gemspec
CHANGED
@@ -24,11 +24,12 @@ Gem::Specification.new do |s|
|
|
24
24
|
s.homepage = 'https://selenium.dev'
|
25
25
|
s.metadata = {
|
26
26
|
'changelog_uri' => 'https://github.com/SeleniumHQ/selenium/blob/trunk/rb/CHANGES',
|
27
|
-
'source_code_uri' => 'https://github.com/SeleniumHQ/selenium/tree/trunk/rb'
|
27
|
+
'source_code_uri' => 'https://github.com/SeleniumHQ/selenium/tree/trunk/rb',
|
28
|
+
'rubygems_mfa_required' => 'true'
|
28
29
|
}
|
29
30
|
|
30
31
|
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.
|
32
|
+
s.required_ruby_version = Gem::Requirement.new('>= 2.7')
|
32
33
|
|
33
34
|
s.files = [
|
34
35
|
'CHANGES',
|
@@ -46,7 +47,8 @@ Gem::Specification.new do |s|
|
|
46
47
|
|
47
48
|
s.add_runtime_dependency 'childprocess', ['>= 0.5', '< 5.0']
|
48
49
|
s.add_runtime_dependency 'rexml', ['~> 3.2', '>= 3.2.5']
|
49
|
-
s.add_runtime_dependency 'rubyzip', ['>= 1.2.2']
|
50
|
+
s.add_runtime_dependency 'rubyzip', ['>= 1.2.2', '< 3.0']
|
51
|
+
s.add_runtime_dependency 'websocket', ['~> 1.0']
|
50
52
|
|
51
53
|
# childprocess requires ffi on windows but doesn't declare it in its dependencies
|
52
54
|
s.add_development_dependency 'ffi'
|
@@ -54,8 +56,9 @@ Gem::Specification.new do |s|
|
|
54
56
|
s.add_development_dependency 'rack', ['~> 2.0']
|
55
57
|
s.add_development_dependency 'rake'
|
56
58
|
s.add_development_dependency 'rspec', ['~> 3.0']
|
57
|
-
s.add_development_dependency 'rubocop', ['~> 1.
|
59
|
+
s.add_development_dependency 'rubocop', ['~> 1.22']
|
58
60
|
s.add_development_dependency 'rubocop-performance'
|
61
|
+
s.add_development_dependency 'rubocop-rake'
|
59
62
|
s.add_development_dependency 'rubocop-rspec'
|
60
63
|
s.add_development_dependency 'webmock', ['~> 3.5']
|
61
64
|
s.add_development_dependency 'webrick', ['~> 1.7']
|
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.
|
4
|
+
version: 4.2.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:
|
13
|
+
date: 2022-05-27 00:00:00.000000000 Z
|
14
14
|
dependencies:
|
15
15
|
- !ruby/object:Gem::Dependency
|
16
16
|
name: childprocess
|
@@ -59,6 +59,9 @@ dependencies:
|
|
59
59
|
- - ">="
|
60
60
|
- !ruby/object:Gem::Version
|
61
61
|
version: 1.2.2
|
62
|
+
- - "<"
|
63
|
+
- !ruby/object:Gem::Version
|
64
|
+
version: '3.0'
|
62
65
|
type: :runtime
|
63
66
|
prerelease: false
|
64
67
|
version_requirements: !ruby/object:Gem::Requirement
|
@@ -66,6 +69,23 @@ dependencies:
|
|
66
69
|
- - ">="
|
67
70
|
- !ruby/object:Gem::Version
|
68
71
|
version: 1.2.2
|
72
|
+
- - "<"
|
73
|
+
- !ruby/object:Gem::Version
|
74
|
+
version: '3.0'
|
75
|
+
- !ruby/object:Gem::Dependency
|
76
|
+
name: websocket
|
77
|
+
requirement: !ruby/object:Gem::Requirement
|
78
|
+
requirements:
|
79
|
+
- - "~>"
|
80
|
+
- !ruby/object:Gem::Version
|
81
|
+
version: '1.0'
|
82
|
+
type: :runtime
|
83
|
+
prerelease: false
|
84
|
+
version_requirements: !ruby/object:Gem::Requirement
|
85
|
+
requirements:
|
86
|
+
- - "~>"
|
87
|
+
- !ruby/object:Gem::Version
|
88
|
+
version: '1.0'
|
69
89
|
- !ruby/object:Gem::Dependency
|
70
90
|
name: ffi
|
71
91
|
requirement: !ruby/object:Gem::Requirement
|
@@ -142,14 +162,14 @@ dependencies:
|
|
142
162
|
requirements:
|
143
163
|
- - "~>"
|
144
164
|
- !ruby/object:Gem::Version
|
145
|
-
version: 1.
|
165
|
+
version: '1.22'
|
146
166
|
type: :development
|
147
167
|
prerelease: false
|
148
168
|
version_requirements: !ruby/object:Gem::Requirement
|
149
169
|
requirements:
|
150
170
|
- - "~>"
|
151
171
|
- !ruby/object:Gem::Version
|
152
|
-
version: 1.
|
172
|
+
version: '1.22'
|
153
173
|
- !ruby/object:Gem::Dependency
|
154
174
|
name: rubocop-performance
|
155
175
|
requirement: !ruby/object:Gem::Requirement
|
@@ -164,6 +184,20 @@ dependencies:
|
|
164
184
|
- - ">="
|
165
185
|
- !ruby/object:Gem::Version
|
166
186
|
version: '0'
|
187
|
+
- !ruby/object:Gem::Dependency
|
188
|
+
name: rubocop-rake
|
189
|
+
requirement: !ruby/object:Gem::Requirement
|
190
|
+
requirements:
|
191
|
+
- - ">="
|
192
|
+
- !ruby/object:Gem::Version
|
193
|
+
version: '0'
|
194
|
+
type: :development
|
195
|
+
prerelease: false
|
196
|
+
version_requirements: !ruby/object:Gem::Requirement
|
197
|
+
requirements:
|
198
|
+
- - ">="
|
199
|
+
- !ruby/object:Gem::Version
|
200
|
+
version: '0'
|
167
201
|
- !ruby/object:Gem::Dependency
|
168
202
|
name: rubocop-rspec
|
169
203
|
requirement: !ruby/object:Gem::Requirement
|
@@ -245,6 +279,8 @@ files:
|
|
245
279
|
- lib/selenium/webdriver/atoms/getAttribute.js
|
246
280
|
- lib/selenium/webdriver/atoms/isDisplayed.js
|
247
281
|
- lib/selenium/webdriver/atoms/mutationListener.js
|
282
|
+
- lib/selenium/webdriver/bidi.rb
|
283
|
+
- lib/selenium/webdriver/bidi/session.rb
|
248
284
|
- lib/selenium/webdriver/chrome.rb
|
249
285
|
- lib/selenium/webdriver/chrome/driver.rb
|
250
286
|
- lib/selenium/webdriver/chrome/features.rb
|
@@ -260,6 +296,7 @@ files:
|
|
260
296
|
- lib/selenium/webdriver/common/driver_extensions/has_addons.rb
|
261
297
|
- lib/selenium/webdriver/common/driver_extensions/has_apple_permissions.rb
|
262
298
|
- lib/selenium/webdriver/common/driver_extensions/has_authentication.rb
|
299
|
+
- lib/selenium/webdriver/common/driver_extensions/has_bidi.rb
|
263
300
|
- lib/selenium/webdriver/common/driver_extensions/has_casting.rb
|
264
301
|
- lib/selenium/webdriver/common/driver_extensions/has_cdp.rb
|
265
302
|
- lib/selenium/webdriver/common/driver_extensions/has_context.rb
|
@@ -291,8 +328,18 @@ files:
|
|
291
328
|
- lib/selenium/webdriver/common/interactions/key_actions.rb
|
292
329
|
- lib/selenium/webdriver/common/interactions/key_input.rb
|
293
330
|
- lib/selenium/webdriver/common/interactions/none_input.rb
|
331
|
+
- lib/selenium/webdriver/common/interactions/pause.rb
|
294
332
|
- lib/selenium/webdriver/common/interactions/pointer_actions.rb
|
333
|
+
- lib/selenium/webdriver/common/interactions/pointer_cancel.rb
|
334
|
+
- lib/selenium/webdriver/common/interactions/pointer_event_properties.rb
|
295
335
|
- lib/selenium/webdriver/common/interactions/pointer_input.rb
|
336
|
+
- lib/selenium/webdriver/common/interactions/pointer_move.rb
|
337
|
+
- lib/selenium/webdriver/common/interactions/pointer_press.rb
|
338
|
+
- lib/selenium/webdriver/common/interactions/scroll.rb
|
339
|
+
- lib/selenium/webdriver/common/interactions/scroll_origin.rb
|
340
|
+
- lib/selenium/webdriver/common/interactions/typing_interaction.rb
|
341
|
+
- lib/selenium/webdriver/common/interactions/wheel_actions.rb
|
342
|
+
- lib/selenium/webdriver/common/interactions/wheel_input.rb
|
296
343
|
- lib/selenium/webdriver/common/keys.rb
|
297
344
|
- lib/selenium/webdriver/common/log_entry.rb
|
298
345
|
- lib/selenium/webdriver/common/logger.rb
|
@@ -314,6 +361,7 @@ files:
|
|
314
361
|
- lib/selenium/webdriver/common/target_locator.rb
|
315
362
|
- lib/selenium/webdriver/common/timeouts.rb
|
316
363
|
- lib/selenium/webdriver/common/wait.rb
|
364
|
+
- lib/selenium/webdriver/common/websocket_connection.rb
|
317
365
|
- lib/selenium/webdriver/common/window.rb
|
318
366
|
- lib/selenium/webdriver/common/zipper.rb
|
319
367
|
- lib/selenium/webdriver/devtools.rb
|
@@ -337,6 +385,7 @@ files:
|
|
337
385
|
- lib/selenium/webdriver/firefox/profile.rb
|
338
386
|
- lib/selenium/webdriver/firefox/profiles_ini.rb
|
339
387
|
- lib/selenium/webdriver/firefox/service.rb
|
388
|
+
- lib/selenium/webdriver/firefox/util.rb
|
340
389
|
- lib/selenium/webdriver/ie.rb
|
341
390
|
- lib/selenium/webdriver/ie/driver.rb
|
342
391
|
- lib/selenium/webdriver/ie/options.rb
|
@@ -378,6 +427,7 @@ licenses:
|
|
378
427
|
metadata:
|
379
428
|
changelog_uri: https://github.com/SeleniumHQ/selenium/blob/trunk/rb/CHANGES
|
380
429
|
source_code_uri: https://github.com/SeleniumHQ/selenium/tree/trunk/rb
|
430
|
+
rubygems_mfa_required: 'true'
|
381
431
|
post_install_message:
|
382
432
|
rdoc_options: []
|
383
433
|
require_paths:
|
@@ -386,7 +436,7 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
386
436
|
requirements:
|
387
437
|
- - ">="
|
388
438
|
- !ruby/object:Gem::Version
|
389
|
-
version: '2.
|
439
|
+
version: '2.7'
|
390
440
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
391
441
|
requirements:
|
392
442
|
- - ">"
|