selenium-webdriver 4.45.0 → 4.46.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 +7 -0
- data/bin/linux/selenium-manager +0 -0
- data/bin/macos/selenium-manager +0 -0
- data/bin/windows/selenium-manager.exe +0 -0
- data/lib/selenium/webdriver/bidi/protocol/bluetooth.rb +465 -0
- data/lib/selenium/webdriver/bidi/protocol/browser.rb +222 -0
- data/lib/selenium/webdriver/bidi/protocol/browsing_context.rb +694 -0
- data/lib/selenium/webdriver/bidi/protocol/domain.rb +40 -0
- data/lib/selenium/webdriver/bidi/protocol/emulation.rb +334 -0
- data/lib/selenium/webdriver/bidi/protocol/input.rb +281 -0
- data/lib/selenium/webdriver/bidi/protocol/log.rb +104 -0
- data/lib/selenium/webdriver/bidi/protocol/network.rb +637 -0
- data/lib/selenium/webdriver/bidi/protocol/permissions.rb +73 -0
- data/lib/selenium/webdriver/bidi/protocol/script.rb +874 -0
- data/lib/selenium/webdriver/bidi/protocol/session.rb +241 -0
- data/lib/selenium/webdriver/bidi/protocol/speculation.rb +56 -0
- data/lib/selenium/webdriver/bidi/protocol/storage.rb +157 -0
- data/lib/selenium/webdriver/bidi/protocol/user_agent_client_hints.rb +83 -0
- data/lib/selenium/webdriver/bidi/protocol/web_extension.rb +93 -0
- data/lib/selenium/webdriver/bidi/protocol.rb +39 -0
- data/lib/selenium/webdriver/bidi/serialization/record.rb +226 -0
- data/lib/selenium/webdriver/bidi/serialization/union.rb +114 -0
- data/lib/selenium/webdriver/bidi/serialization.rb +78 -0
- data/lib/selenium/webdriver/bidi/support/bidi_generate.rb +936 -0
- data/lib/selenium/webdriver/bidi/support/check_generated.rb +55 -0
- data/lib/selenium/webdriver/bidi/transport.rb +52 -0
- data/lib/selenium/webdriver/bidi.rb +3 -0
- data/lib/selenium/webdriver/chrome/driver.rb +3 -3
- data/lib/selenium/webdriver/common/client_config.rb +97 -0
- data/lib/selenium/webdriver/common/driver.rb +2 -2
- data/lib/selenium/webdriver/common/local_driver.rb +15 -4
- data/lib/selenium/webdriver/common/proxy.rb +1 -1
- data/lib/selenium/webdriver/common.rb +1 -0
- data/lib/selenium/webdriver/edge/driver.rb +3 -3
- data/lib/selenium/webdriver/firefox/driver.rb +3 -3
- data/lib/selenium/webdriver/ie/driver.rb +3 -3
- data/lib/selenium/webdriver/remote/bidi_bridge.rb +6 -1
- data/lib/selenium/webdriver/remote/bridge.rb +8 -10
- data/lib/selenium/webdriver/remote/driver.rb +12 -4
- data/lib/selenium/webdriver/remote/http/common.rb +25 -12
- data/lib/selenium/webdriver/remote/http/default.rb +56 -39
- data/lib/selenium/webdriver/safari/driver.rb +3 -3
- data/lib/selenium/webdriver/version.rb +1 -1
- metadata +25 -2
|
@@ -0,0 +1,241 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
3
|
+
# Licensed to the Software Freedom Conservancy (SFC) under one
|
|
4
|
+
# or more contributor license agreements. See the NOTICE file
|
|
5
|
+
# distributed with this work for additional information
|
|
6
|
+
# regarding copyright ownership. The SFC licenses this file
|
|
7
|
+
# to you under the Apache License, Version 2.0 (the
|
|
8
|
+
# "License"); you may not use this file except in compliance
|
|
9
|
+
# with the License. You may obtain a copy of the License at
|
|
10
|
+
#
|
|
11
|
+
# http://www.apache.org/licenses/LICENSE-2.0
|
|
12
|
+
#
|
|
13
|
+
# Unless required by applicable law or agreed to in writing,
|
|
14
|
+
# software distributed under the License is distributed on an
|
|
15
|
+
# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
|
|
16
|
+
# KIND, either express or implied. See the License for the
|
|
17
|
+
# specific language governing permissions and limitations
|
|
18
|
+
# under the License.
|
|
19
|
+
|
|
20
|
+
# This file is automatically generated. DO NOT EDIT!
|
|
21
|
+
# Regenerate with: bazel run //rb/lib/selenium/webdriver:bidi-generate
|
|
22
|
+
|
|
23
|
+
module Selenium
|
|
24
|
+
module WebDriver
|
|
25
|
+
class BiDi
|
|
26
|
+
module Protocol
|
|
27
|
+
# @api private
|
|
28
|
+
# @see https://www.selenium.dev/documentation/warnings/bidi-implementation/
|
|
29
|
+
class Session < Domain
|
|
30
|
+
USER_PROMPT_HANDLER_TYPE = {
|
|
31
|
+
accept: 'accept',
|
|
32
|
+
dismiss: 'dismiss',
|
|
33
|
+
ignore: 'ignore'
|
|
34
|
+
}.freeze
|
|
35
|
+
|
|
36
|
+
# @api private
|
|
37
|
+
# @see https://www.selenium.dev/documentation/warnings/bidi-implementation/
|
|
38
|
+
CapabilitiesRequest = Serialization::Record.define(
|
|
39
|
+
always_match: {wire_key: 'alwaysMatch', required: false, ref: 'Session::CapabilityRequest'},
|
|
40
|
+
first_match: {wire_key: 'firstMatch', required: false, ref: 'Session::CapabilityRequest', list: true}
|
|
41
|
+
)
|
|
42
|
+
|
|
43
|
+
# @api private
|
|
44
|
+
# @see https://www.selenium.dev/documentation/warnings/bidi-implementation/
|
|
45
|
+
CapabilityRequest = Serialization::Record.define(
|
|
46
|
+
accept_insecure_certs: {wire_key: 'acceptInsecureCerts', required: false, primitive: 'boolean'},
|
|
47
|
+
browser_name: {wire_key: 'browserName', required: false, primitive: 'string'},
|
|
48
|
+
browser_version: {wire_key: 'browserVersion', required: false, primitive: 'string'},
|
|
49
|
+
platform_name: {wire_key: 'platformName', required: false, primitive: 'string'},
|
|
50
|
+
proxy: {wire_key: 'proxy', required: false, ref: 'Session::ProxyConfiguration'},
|
|
51
|
+
unhandled_prompt_behavior: {
|
|
52
|
+
wire_key: 'unhandledPromptBehavior',
|
|
53
|
+
required: false,
|
|
54
|
+
ref: 'Session::UserPromptHandler'
|
|
55
|
+
},
|
|
56
|
+
extensible: true
|
|
57
|
+
)
|
|
58
|
+
|
|
59
|
+
# @api private
|
|
60
|
+
# @see https://www.selenium.dev/documentation/warnings/bidi-implementation/
|
|
61
|
+
class ProxyConfiguration < Serialization::Union
|
|
62
|
+
discriminator 'proxyType', {
|
|
63
|
+
autodetect: 'autodetect',
|
|
64
|
+
direct: 'direct',
|
|
65
|
+
manual: 'manual',
|
|
66
|
+
pac: 'pac',
|
|
67
|
+
system: 'system'
|
|
68
|
+
}
|
|
69
|
+
variants(
|
|
70
|
+
autodetect: 'Session::AutodetectProxyConfiguration',
|
|
71
|
+
direct: 'Session::DirectProxyConfiguration',
|
|
72
|
+
manual: 'Session::ManualProxyConfiguration',
|
|
73
|
+
pac: 'Session::PacProxyConfiguration',
|
|
74
|
+
system: 'Session::SystemProxyConfiguration'
|
|
75
|
+
)
|
|
76
|
+
end
|
|
77
|
+
|
|
78
|
+
# @api private
|
|
79
|
+
# @see https://www.selenium.dev/documentation/warnings/bidi-implementation/
|
|
80
|
+
AutodetectProxyConfiguration = Serialization::Record.define(
|
|
81
|
+
proxy_type: {wire_key: 'proxyType', fixed: 'autodetect'},
|
|
82
|
+
extensible: true
|
|
83
|
+
)
|
|
84
|
+
|
|
85
|
+
# @api private
|
|
86
|
+
# @see https://www.selenium.dev/documentation/warnings/bidi-implementation/
|
|
87
|
+
DirectProxyConfiguration = Serialization::Record.define(
|
|
88
|
+
proxy_type: {wire_key: 'proxyType', fixed: 'direct'},
|
|
89
|
+
extensible: true
|
|
90
|
+
)
|
|
91
|
+
|
|
92
|
+
# @api private
|
|
93
|
+
# @see https://www.selenium.dev/documentation/warnings/bidi-implementation/
|
|
94
|
+
ManualProxyConfiguration = Serialization::Record.define(
|
|
95
|
+
proxy_type: {wire_key: 'proxyType', fixed: 'manual'},
|
|
96
|
+
http_proxy: {wire_key: 'httpProxy', required: false, primitive: 'string'},
|
|
97
|
+
ssl_proxy: {wire_key: 'sslProxy', required: false, primitive: 'string'},
|
|
98
|
+
socks_proxy: {wire_key: 'socksProxy', primitive: 'string'},
|
|
99
|
+
socks_version: {wire_key: 'socksVersion', primitive: 'integer'},
|
|
100
|
+
no_proxy: {wire_key: 'noProxy', required: false, list: true},
|
|
101
|
+
extensible: true
|
|
102
|
+
)
|
|
103
|
+
|
|
104
|
+
# @api private
|
|
105
|
+
# @see https://www.selenium.dev/documentation/warnings/bidi-implementation/
|
|
106
|
+
SocksProxyConfiguration = Serialization::Record.define(
|
|
107
|
+
socks_proxy: {wire_key: 'socksProxy', primitive: 'string'},
|
|
108
|
+
socks_version: {wire_key: 'socksVersion', primitive: 'integer'}
|
|
109
|
+
)
|
|
110
|
+
|
|
111
|
+
# @api private
|
|
112
|
+
# @see https://www.selenium.dev/documentation/warnings/bidi-implementation/
|
|
113
|
+
PacProxyConfiguration = Serialization::Record.define(
|
|
114
|
+
proxy_type: {wire_key: 'proxyType', fixed: 'pac'},
|
|
115
|
+
proxy_autoconfig_url: {wire_key: 'proxyAutoconfigUrl', primitive: 'string'},
|
|
116
|
+
extensible: true
|
|
117
|
+
)
|
|
118
|
+
|
|
119
|
+
# @api private
|
|
120
|
+
# @see https://www.selenium.dev/documentation/warnings/bidi-implementation/
|
|
121
|
+
SystemProxyConfiguration = Serialization::Record.define(
|
|
122
|
+
proxy_type: {wire_key: 'proxyType', fixed: 'system'},
|
|
123
|
+
extensible: true
|
|
124
|
+
)
|
|
125
|
+
|
|
126
|
+
# @api private
|
|
127
|
+
# @see https://www.selenium.dev/documentation/warnings/bidi-implementation/
|
|
128
|
+
UserPromptHandler = Serialization::Record.define(
|
|
129
|
+
alert: {wire_key: 'alert', required: false, enum: 'Session::USER_PROMPT_HANDLER_TYPE'},
|
|
130
|
+
before_unload: {wire_key: 'beforeUnload', required: false, enum: 'Session::USER_PROMPT_HANDLER_TYPE'},
|
|
131
|
+
confirm: {wire_key: 'confirm', required: false, enum: 'Session::USER_PROMPT_HANDLER_TYPE'},
|
|
132
|
+
default: {wire_key: 'default', required: false, enum: 'Session::USER_PROMPT_HANDLER_TYPE'},
|
|
133
|
+
file: {wire_key: 'file', required: false, enum: 'Session::USER_PROMPT_HANDLER_TYPE'},
|
|
134
|
+
prompt: {wire_key: 'prompt', required: false, enum: 'Session::USER_PROMPT_HANDLER_TYPE'}
|
|
135
|
+
)
|
|
136
|
+
|
|
137
|
+
# @api private
|
|
138
|
+
# @see https://www.selenium.dev/documentation/warnings/bidi-implementation/
|
|
139
|
+
SubscribeParameters = Serialization::Record.define(
|
|
140
|
+
events: {wire_key: 'events', list: true},
|
|
141
|
+
contexts: {wire_key: 'contexts', required: false, list: true},
|
|
142
|
+
user_contexts: {wire_key: 'userContexts', required: false, list: true}
|
|
143
|
+
)
|
|
144
|
+
|
|
145
|
+
# @api private
|
|
146
|
+
# @see https://www.selenium.dev/documentation/warnings/bidi-implementation/
|
|
147
|
+
UnsubscribeByIDRequest = Serialization::Record.define(subscriptions: {wire_key: 'subscriptions', list: true})
|
|
148
|
+
|
|
149
|
+
# @api private
|
|
150
|
+
# @see https://www.selenium.dev/documentation/warnings/bidi-implementation/
|
|
151
|
+
UnsubscribeByAttributesRequest = Serialization::Record.define(events: {wire_key: 'events', list: true})
|
|
152
|
+
|
|
153
|
+
# @api private
|
|
154
|
+
# @see https://www.selenium.dev/documentation/warnings/bidi-implementation/
|
|
155
|
+
StatusResult = Serialization::Record.define(
|
|
156
|
+
ready: {wire_key: 'ready', primitive: 'boolean'},
|
|
157
|
+
message: {wire_key: 'message', primitive: 'string'}
|
|
158
|
+
)
|
|
159
|
+
|
|
160
|
+
# @api private
|
|
161
|
+
# @see https://www.selenium.dev/documentation/warnings/bidi-implementation/
|
|
162
|
+
NewParameters = Serialization::Record.define(
|
|
163
|
+
capabilities: {wire_key: 'capabilities', ref: 'Session::CapabilitiesRequest'}
|
|
164
|
+
)
|
|
165
|
+
|
|
166
|
+
# @api private
|
|
167
|
+
# @see https://www.selenium.dev/documentation/warnings/bidi-implementation/
|
|
168
|
+
NewResult = Serialization::Record.define(
|
|
169
|
+
session_id: {wire_key: 'sessionId', primitive: 'string'},
|
|
170
|
+
capabilities: {wire_key: 'capabilities', ref: 'Session::NewResult::Capabilities'}
|
|
171
|
+
)
|
|
172
|
+
|
|
173
|
+
# @api private
|
|
174
|
+
# @see https://www.selenium.dev/documentation/warnings/bidi-implementation/
|
|
175
|
+
NewResult::Capabilities = Serialization::Record.define(
|
|
176
|
+
accept_insecure_certs: {wire_key: 'acceptInsecureCerts', primitive: 'boolean'},
|
|
177
|
+
browser_name: {wire_key: 'browserName', primitive: 'string'},
|
|
178
|
+
browser_version: {wire_key: 'browserVersion', primitive: 'string'},
|
|
179
|
+
platform_name: {wire_key: 'platformName', primitive: 'string'},
|
|
180
|
+
set_window_rect: {wire_key: 'setWindowRect', primitive: 'boolean'},
|
|
181
|
+
user_agent: {wire_key: 'userAgent', primitive: 'string'},
|
|
182
|
+
proxy: {wire_key: 'proxy', required: false, ref: 'Session::ProxyConfiguration'},
|
|
183
|
+
unhandled_prompt_behavior: {
|
|
184
|
+
wire_key: 'unhandledPromptBehavior',
|
|
185
|
+
required: false,
|
|
186
|
+
ref: 'Session::UserPromptHandler'
|
|
187
|
+
},
|
|
188
|
+
web_socket_url: {wire_key: 'webSocketUrl', required: false, primitive: 'string'},
|
|
189
|
+
extensible: true
|
|
190
|
+
)
|
|
191
|
+
|
|
192
|
+
# @api private
|
|
193
|
+
# @see https://www.selenium.dev/documentation/warnings/bidi-implementation/
|
|
194
|
+
SubscribeResult = Serialization::Record.define(subscription: 'subscription')
|
|
195
|
+
|
|
196
|
+
# @api private
|
|
197
|
+
# @see https://www.selenium.dev/documentation/warnings/bidi-implementation/
|
|
198
|
+
class UnsubscribeParameters < Serialization::Union
|
|
199
|
+
presence(
|
|
200
|
+
'Session::UnsubscribeByAttributesRequest' => ['events'],
|
|
201
|
+
'Session::UnsubscribeByIDRequest' => ['subscriptions']
|
|
202
|
+
)
|
|
203
|
+
end
|
|
204
|
+
|
|
205
|
+
# @api private
|
|
206
|
+
# @see https://www.selenium.dev/documentation/warnings/bidi-implementation/
|
|
207
|
+
def end_
|
|
208
|
+
execute(cmd: 'session.end')
|
|
209
|
+
end
|
|
210
|
+
|
|
211
|
+
# @api private
|
|
212
|
+
# @see https://www.selenium.dev/documentation/warnings/bidi-implementation/
|
|
213
|
+
def new(capabilities:)
|
|
214
|
+
params = NewParameters.new(capabilities: capabilities)
|
|
215
|
+
execute(cmd: 'session.new', params: params, result: Session::NewResult)
|
|
216
|
+
end
|
|
217
|
+
|
|
218
|
+
# @api private
|
|
219
|
+
# @see https://www.selenium.dev/documentation/warnings/bidi-implementation/
|
|
220
|
+
def status
|
|
221
|
+
execute(cmd: 'session.status', result: Session::StatusResult)
|
|
222
|
+
end
|
|
223
|
+
|
|
224
|
+
# @api private
|
|
225
|
+
# @see https://www.selenium.dev/documentation/warnings/bidi-implementation/
|
|
226
|
+
def subscribe(events:, contexts: Serialization::UNSET, user_contexts: Serialization::UNSET)
|
|
227
|
+
params = SubscribeParameters.new(events: events, contexts: contexts, user_contexts: user_contexts)
|
|
228
|
+
execute(cmd: 'session.subscribe', params: params, result: Session::SubscribeResult)
|
|
229
|
+
end
|
|
230
|
+
|
|
231
|
+
# @api private
|
|
232
|
+
# @see https://www.selenium.dev/documentation/warnings/bidi-implementation/
|
|
233
|
+
def unsubscribe(events: Serialization::UNSET, subscriptions: Serialization::UNSET)
|
|
234
|
+
params = UnsubscribeParameters.build(events: events, subscriptions: subscriptions)
|
|
235
|
+
execute(cmd: 'session.unsubscribe', params: params)
|
|
236
|
+
end
|
|
237
|
+
end # Session
|
|
238
|
+
end # Protocol
|
|
239
|
+
end # BiDi
|
|
240
|
+
end # WebDriver
|
|
241
|
+
end # Selenium
|
|
@@ -0,0 +1,56 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
3
|
+
# Licensed to the Software Freedom Conservancy (SFC) under one
|
|
4
|
+
# or more contributor license agreements. See the NOTICE file
|
|
5
|
+
# distributed with this work for additional information
|
|
6
|
+
# regarding copyright ownership. The SFC licenses this file
|
|
7
|
+
# to you under the Apache License, Version 2.0 (the
|
|
8
|
+
# "License"); you may not use this file except in compliance
|
|
9
|
+
# with the License. You may obtain a copy of the License at
|
|
10
|
+
#
|
|
11
|
+
# http://www.apache.org/licenses/LICENSE-2.0
|
|
12
|
+
#
|
|
13
|
+
# Unless required by applicable law or agreed to in writing,
|
|
14
|
+
# software distributed under the License is distributed on an
|
|
15
|
+
# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
|
|
16
|
+
# KIND, either express or implied. See the License for the
|
|
17
|
+
# specific language governing permissions and limitations
|
|
18
|
+
# under the License.
|
|
19
|
+
|
|
20
|
+
# This file is automatically generated. DO NOT EDIT!
|
|
21
|
+
# Regenerate with: bazel run //rb/lib/selenium/webdriver:bidi-generate
|
|
22
|
+
|
|
23
|
+
module Selenium
|
|
24
|
+
module WebDriver
|
|
25
|
+
class BiDi
|
|
26
|
+
module Protocol
|
|
27
|
+
# @api private
|
|
28
|
+
# @see https://www.selenium.dev/documentation/warnings/bidi-implementation/
|
|
29
|
+
class Speculation < Domain
|
|
30
|
+
EVENTS = {
|
|
31
|
+
prefetch_status_updated: 'speculation.prefetchStatusUpdated'
|
|
32
|
+
}.freeze
|
|
33
|
+
|
|
34
|
+
PRELOADING_STATUS = {
|
|
35
|
+
pending: 'pending',
|
|
36
|
+
ready: 'ready',
|
|
37
|
+
success: 'success',
|
|
38
|
+
failure: 'failure'
|
|
39
|
+
}.freeze
|
|
40
|
+
|
|
41
|
+
# @api private
|
|
42
|
+
# @see https://www.selenium.dev/documentation/warnings/bidi-implementation/
|
|
43
|
+
PrefetchStatusUpdatedParameters = Serialization::Record.define(
|
|
44
|
+
context: {wire_key: 'context', primitive: 'string'},
|
|
45
|
+
url: {wire_key: 'url', primitive: 'string'},
|
|
46
|
+
status: {wire_key: 'status', enum: 'Speculation::PRELOADING_STATUS'}
|
|
47
|
+
)
|
|
48
|
+
|
|
49
|
+
EVENT_TYPES = {
|
|
50
|
+
'speculation.prefetchStatusUpdated' => Speculation::PrefetchStatusUpdatedParameters
|
|
51
|
+
}.freeze
|
|
52
|
+
end # Speculation
|
|
53
|
+
end # Protocol
|
|
54
|
+
end # BiDi
|
|
55
|
+
end # WebDriver
|
|
56
|
+
end # Selenium
|
|
@@ -0,0 +1,157 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
3
|
+
# Licensed to the Software Freedom Conservancy (SFC) under one
|
|
4
|
+
# or more contributor license agreements. See the NOTICE file
|
|
5
|
+
# distributed with this work for additional information
|
|
6
|
+
# regarding copyright ownership. The SFC licenses this file
|
|
7
|
+
# to you under the Apache License, Version 2.0 (the
|
|
8
|
+
# "License"); you may not use this file except in compliance
|
|
9
|
+
# with the License. You may obtain a copy of the License at
|
|
10
|
+
#
|
|
11
|
+
# http://www.apache.org/licenses/LICENSE-2.0
|
|
12
|
+
#
|
|
13
|
+
# Unless required by applicable law or agreed to in writing,
|
|
14
|
+
# software distributed under the License is distributed on an
|
|
15
|
+
# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
|
|
16
|
+
# KIND, either express or implied. See the License for the
|
|
17
|
+
# specific language governing permissions and limitations
|
|
18
|
+
# under the License.
|
|
19
|
+
|
|
20
|
+
# This file is automatically generated. DO NOT EDIT!
|
|
21
|
+
# Regenerate with: bazel run //rb/lib/selenium/webdriver:bidi-generate
|
|
22
|
+
|
|
23
|
+
module Selenium
|
|
24
|
+
module WebDriver
|
|
25
|
+
class BiDi
|
|
26
|
+
module Protocol
|
|
27
|
+
# @api private
|
|
28
|
+
# @see https://www.selenium.dev/documentation/warnings/bidi-implementation/
|
|
29
|
+
class Storage < Domain
|
|
30
|
+
# @api private
|
|
31
|
+
# @see https://www.selenium.dev/documentation/warnings/bidi-implementation/
|
|
32
|
+
PartitionKey = Serialization::Record.define(
|
|
33
|
+
user_context: {wire_key: 'userContext', required: false, primitive: 'string'},
|
|
34
|
+
source_origin: {wire_key: 'sourceOrigin', required: false, primitive: 'string'},
|
|
35
|
+
extensible: true
|
|
36
|
+
)
|
|
37
|
+
|
|
38
|
+
# @api private
|
|
39
|
+
# @see https://www.selenium.dev/documentation/warnings/bidi-implementation/
|
|
40
|
+
CookieFilter = Serialization::Record.define(
|
|
41
|
+
name: {wire_key: 'name', required: false, primitive: 'string'},
|
|
42
|
+
value: {wire_key: 'value', required: false, ref: 'Network::BytesValue'},
|
|
43
|
+
domain: {wire_key: 'domain', required: false, primitive: 'string'},
|
|
44
|
+
path: {wire_key: 'path', required: false, primitive: 'string'},
|
|
45
|
+
size: {wire_key: 'size', required: false},
|
|
46
|
+
http_only: {wire_key: 'httpOnly', required: false, primitive: 'boolean'},
|
|
47
|
+
secure: {wire_key: 'secure', required: false, primitive: 'boolean'},
|
|
48
|
+
same_site: {wire_key: 'sameSite', required: false, enum: 'Network::SAME_SITE'},
|
|
49
|
+
expiry: {wire_key: 'expiry', required: false},
|
|
50
|
+
extensible: true
|
|
51
|
+
)
|
|
52
|
+
|
|
53
|
+
# @api private
|
|
54
|
+
# @see https://www.selenium.dev/documentation/warnings/bidi-implementation/
|
|
55
|
+
BrowsingContextPartitionDescriptor = Serialization::Record.define(
|
|
56
|
+
type: {fixed: 'context'},
|
|
57
|
+
context: 'context'
|
|
58
|
+
)
|
|
59
|
+
|
|
60
|
+
# @api private
|
|
61
|
+
# @see https://www.selenium.dev/documentation/warnings/bidi-implementation/
|
|
62
|
+
StorageKeyPartitionDescriptor = Serialization::Record.define(
|
|
63
|
+
type: {fixed: 'storageKey'},
|
|
64
|
+
user_context: {wire_key: 'userContext', required: false, primitive: 'string'},
|
|
65
|
+
source_origin: {wire_key: 'sourceOrigin', required: false, primitive: 'string'},
|
|
66
|
+
extensible: true
|
|
67
|
+
)
|
|
68
|
+
|
|
69
|
+
# @api private
|
|
70
|
+
# @see https://www.selenium.dev/documentation/warnings/bidi-implementation/
|
|
71
|
+
class PartitionDescriptor < Serialization::Union
|
|
72
|
+
discriminator 'type', {context: 'context', storage_key: 'storageKey'}
|
|
73
|
+
variants(
|
|
74
|
+
context: 'Storage::BrowsingContextPartitionDescriptor',
|
|
75
|
+
storage_key: 'Storage::StorageKeyPartitionDescriptor'
|
|
76
|
+
)
|
|
77
|
+
end
|
|
78
|
+
|
|
79
|
+
# @api private
|
|
80
|
+
# @see https://www.selenium.dev/documentation/warnings/bidi-implementation/
|
|
81
|
+
GetCookiesParameters = Serialization::Record.define(
|
|
82
|
+
filter: {wire_key: 'filter', required: false, ref: 'Storage::CookieFilter'},
|
|
83
|
+
partition: {wire_key: 'partition', required: false, ref: 'Storage::PartitionDescriptor'}
|
|
84
|
+
)
|
|
85
|
+
|
|
86
|
+
# @api private
|
|
87
|
+
# @see https://www.selenium.dev/documentation/warnings/bidi-implementation/
|
|
88
|
+
GetCookiesResult = Serialization::Record.define(
|
|
89
|
+
cookies: {wire_key: 'cookies', ref: 'Network::Cookie', list: true},
|
|
90
|
+
partition_key: {wire_key: 'partitionKey', ref: 'Storage::PartitionKey'}
|
|
91
|
+
)
|
|
92
|
+
|
|
93
|
+
# @api private
|
|
94
|
+
# @see https://www.selenium.dev/documentation/warnings/bidi-implementation/
|
|
95
|
+
PartialCookie = Serialization::Record.define(
|
|
96
|
+
name: {wire_key: 'name', primitive: 'string'},
|
|
97
|
+
value: {wire_key: 'value', ref: 'Network::BytesValue'},
|
|
98
|
+
domain: {wire_key: 'domain', primitive: 'string'},
|
|
99
|
+
path: {wire_key: 'path', required: false, primitive: 'string'},
|
|
100
|
+
http_only: {wire_key: 'httpOnly', required: false, primitive: 'boolean'},
|
|
101
|
+
secure: {wire_key: 'secure', required: false, primitive: 'boolean'},
|
|
102
|
+
same_site: {wire_key: 'sameSite', required: false, enum: 'Network::SAME_SITE'},
|
|
103
|
+
expiry: {wire_key: 'expiry', required: false},
|
|
104
|
+
extensible: true
|
|
105
|
+
)
|
|
106
|
+
|
|
107
|
+
# @api private
|
|
108
|
+
# @see https://www.selenium.dev/documentation/warnings/bidi-implementation/
|
|
109
|
+
SetCookieParameters = Serialization::Record.define(
|
|
110
|
+
cookie: {wire_key: 'cookie', ref: 'Storage::PartialCookie'},
|
|
111
|
+
partition: {wire_key: 'partition', required: false, ref: 'Storage::PartitionDescriptor'}
|
|
112
|
+
)
|
|
113
|
+
|
|
114
|
+
# @api private
|
|
115
|
+
# @see https://www.selenium.dev/documentation/warnings/bidi-implementation/
|
|
116
|
+
SetCookieResult = Serialization::Record.define(
|
|
117
|
+
partition_key: {wire_key: 'partitionKey', ref: 'Storage::PartitionKey'}
|
|
118
|
+
)
|
|
119
|
+
|
|
120
|
+
# @api private
|
|
121
|
+
# @see https://www.selenium.dev/documentation/warnings/bidi-implementation/
|
|
122
|
+
DeleteCookiesParameters = Serialization::Record.define(
|
|
123
|
+
filter: {wire_key: 'filter', required: false, ref: 'Storage::CookieFilter'},
|
|
124
|
+
partition: {wire_key: 'partition', required: false, ref: 'Storage::PartitionDescriptor'}
|
|
125
|
+
)
|
|
126
|
+
|
|
127
|
+
# @api private
|
|
128
|
+
# @see https://www.selenium.dev/documentation/warnings/bidi-implementation/
|
|
129
|
+
DeleteCookiesResult = Serialization::Record.define(
|
|
130
|
+
partition_key: {wire_key: 'partitionKey', ref: 'Storage::PartitionKey'}
|
|
131
|
+
)
|
|
132
|
+
|
|
133
|
+
# @api private
|
|
134
|
+
# @see https://www.selenium.dev/documentation/warnings/bidi-implementation/
|
|
135
|
+
def delete_cookies(filter: Serialization::UNSET, partition: Serialization::UNSET)
|
|
136
|
+
params = DeleteCookiesParameters.new(filter: filter, partition: partition)
|
|
137
|
+
execute(cmd: 'storage.deleteCookies', params: params, result: Storage::DeleteCookiesResult)
|
|
138
|
+
end
|
|
139
|
+
|
|
140
|
+
# @api private
|
|
141
|
+
# @see https://www.selenium.dev/documentation/warnings/bidi-implementation/
|
|
142
|
+
def get_cookies(filter: Serialization::UNSET, partition: Serialization::UNSET)
|
|
143
|
+
params = GetCookiesParameters.new(filter: filter, partition: partition)
|
|
144
|
+
execute(cmd: 'storage.getCookies', params: params, result: Storage::GetCookiesResult)
|
|
145
|
+
end
|
|
146
|
+
|
|
147
|
+
# @api private
|
|
148
|
+
# @see https://www.selenium.dev/documentation/warnings/bidi-implementation/
|
|
149
|
+
def set_cookie(cookie:, partition: Serialization::UNSET)
|
|
150
|
+
params = SetCookieParameters.new(cookie: cookie, partition: partition)
|
|
151
|
+
execute(cmd: 'storage.setCookie', params: params, result: Storage::SetCookieResult)
|
|
152
|
+
end
|
|
153
|
+
end # Storage
|
|
154
|
+
end # Protocol
|
|
155
|
+
end # BiDi
|
|
156
|
+
end # WebDriver
|
|
157
|
+
end # Selenium
|
|
@@ -0,0 +1,83 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
3
|
+
# Licensed to the Software Freedom Conservancy (SFC) under one
|
|
4
|
+
# or more contributor license agreements. See the NOTICE file
|
|
5
|
+
# distributed with this work for additional information
|
|
6
|
+
# regarding copyright ownership. The SFC licenses this file
|
|
7
|
+
# to you under the Apache License, Version 2.0 (the
|
|
8
|
+
# "License"); you may not use this file except in compliance
|
|
9
|
+
# with the License. You may obtain a copy of the License at
|
|
10
|
+
#
|
|
11
|
+
# http://www.apache.org/licenses/LICENSE-2.0
|
|
12
|
+
#
|
|
13
|
+
# Unless required by applicable law or agreed to in writing,
|
|
14
|
+
# software distributed under the License is distributed on an
|
|
15
|
+
# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
|
|
16
|
+
# KIND, either express or implied. See the License for the
|
|
17
|
+
# specific language governing permissions and limitations
|
|
18
|
+
# under the License.
|
|
19
|
+
|
|
20
|
+
# This file is automatically generated. DO NOT EDIT!
|
|
21
|
+
# Regenerate with: bazel run //rb/lib/selenium/webdriver:bidi-generate
|
|
22
|
+
|
|
23
|
+
module Selenium
|
|
24
|
+
module WebDriver
|
|
25
|
+
class BiDi
|
|
26
|
+
module Protocol
|
|
27
|
+
# @api private
|
|
28
|
+
# @see https://www.selenium.dev/documentation/warnings/bidi-implementation/
|
|
29
|
+
class UserAgentClientHints < Domain
|
|
30
|
+
# @api private
|
|
31
|
+
# @see https://www.selenium.dev/documentation/warnings/bidi-implementation/
|
|
32
|
+
ClientHintsMetadata = Serialization::Record.define(
|
|
33
|
+
brands: {wire_key: 'brands', required: false, ref: 'UserAgentClientHints::BrandVersion', list: true},
|
|
34
|
+
full_version_list: {
|
|
35
|
+
wire_key: 'fullVersionList',
|
|
36
|
+
required: false,
|
|
37
|
+
ref: 'UserAgentClientHints::BrandVersion',
|
|
38
|
+
list: true
|
|
39
|
+
},
|
|
40
|
+
platform: {wire_key: 'platform', required: false, primitive: 'string'},
|
|
41
|
+
platform_version: {wire_key: 'platformVersion', required: false, primitive: 'string'},
|
|
42
|
+
architecture: {wire_key: 'architecture', required: false, primitive: 'string'},
|
|
43
|
+
model: {wire_key: 'model', required: false, primitive: 'string'},
|
|
44
|
+
mobile: {wire_key: 'mobile', required: false, primitive: 'boolean'},
|
|
45
|
+
bitness: {wire_key: 'bitness', required: false, primitive: 'string'},
|
|
46
|
+
wow64: {wire_key: 'wow64', required: false, primitive: 'boolean'},
|
|
47
|
+
form_factors: {wire_key: 'formFactors', required: false, list: true}
|
|
48
|
+
)
|
|
49
|
+
|
|
50
|
+
# @api private
|
|
51
|
+
# @see https://www.selenium.dev/documentation/warnings/bidi-implementation/
|
|
52
|
+
BrandVersion = Serialization::Record.define(
|
|
53
|
+
brand: {wire_key: 'brand', primitive: 'string'},
|
|
54
|
+
version: {wire_key: 'version', primitive: 'string'}
|
|
55
|
+
)
|
|
56
|
+
|
|
57
|
+
# @api private
|
|
58
|
+
# @see https://www.selenium.dev/documentation/warnings/bidi-implementation/
|
|
59
|
+
SetClientHintsOverrideCommandParams = Serialization::Record.define(
|
|
60
|
+
client_hints: {wire_key: 'clientHints', nullable: true, ref: 'UserAgentClientHints::ClientHintsMetadata'},
|
|
61
|
+
contexts: {wire_key: 'contexts', required: false, list: true},
|
|
62
|
+
user_contexts: {wire_key: 'userContexts', required: false, list: true}
|
|
63
|
+
)
|
|
64
|
+
|
|
65
|
+
# @api private
|
|
66
|
+
# @see https://www.selenium.dev/documentation/warnings/bidi-implementation/
|
|
67
|
+
def set_client_hints_override(
|
|
68
|
+
client_hints:,
|
|
69
|
+
contexts: Serialization::UNSET,
|
|
70
|
+
user_contexts: Serialization::UNSET
|
|
71
|
+
)
|
|
72
|
+
params = SetClientHintsOverrideCommandParams.new(
|
|
73
|
+
client_hints: client_hints,
|
|
74
|
+
contexts: contexts,
|
|
75
|
+
user_contexts: user_contexts
|
|
76
|
+
)
|
|
77
|
+
execute(cmd: 'userAgentClientHints.setClientHintsOverride', params: params)
|
|
78
|
+
end
|
|
79
|
+
end # UserAgentClientHints
|
|
80
|
+
end # Protocol
|
|
81
|
+
end # BiDi
|
|
82
|
+
end # WebDriver
|
|
83
|
+
end # Selenium
|
|
@@ -0,0 +1,93 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
3
|
+
# Licensed to the Software Freedom Conservancy (SFC) under one
|
|
4
|
+
# or more contributor license agreements. See the NOTICE file
|
|
5
|
+
# distributed with this work for additional information
|
|
6
|
+
# regarding copyright ownership. The SFC licenses this file
|
|
7
|
+
# to you under the Apache License, Version 2.0 (the
|
|
8
|
+
# "License"); you may not use this file except in compliance
|
|
9
|
+
# with the License. You may obtain a copy of the License at
|
|
10
|
+
#
|
|
11
|
+
# http://www.apache.org/licenses/LICENSE-2.0
|
|
12
|
+
#
|
|
13
|
+
# Unless required by applicable law or agreed to in writing,
|
|
14
|
+
# software distributed under the License is distributed on an
|
|
15
|
+
# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
|
|
16
|
+
# KIND, either express or implied. See the License for the
|
|
17
|
+
# specific language governing permissions and limitations
|
|
18
|
+
# under the License.
|
|
19
|
+
|
|
20
|
+
# This file is automatically generated. DO NOT EDIT!
|
|
21
|
+
# Regenerate with: bazel run //rb/lib/selenium/webdriver:bidi-generate
|
|
22
|
+
|
|
23
|
+
module Selenium
|
|
24
|
+
module WebDriver
|
|
25
|
+
class BiDi
|
|
26
|
+
module Protocol
|
|
27
|
+
# @api private
|
|
28
|
+
# @see https://www.selenium.dev/documentation/warnings/bidi-implementation/
|
|
29
|
+
class WebExtension < Domain
|
|
30
|
+
# @api private
|
|
31
|
+
# @see https://www.selenium.dev/documentation/warnings/bidi-implementation/
|
|
32
|
+
InstallParameters = Serialization::Record.define(
|
|
33
|
+
extension_data: {wire_key: 'extensionData', ref: 'WebExtension::ExtensionData'}
|
|
34
|
+
)
|
|
35
|
+
|
|
36
|
+
# @api private
|
|
37
|
+
# @see https://www.selenium.dev/documentation/warnings/bidi-implementation/
|
|
38
|
+
class ExtensionData < Serialization::Union
|
|
39
|
+
discriminator 'type', {archive_path: 'archivePath', base64: 'base64', path: 'path'}
|
|
40
|
+
variants(
|
|
41
|
+
archive_path: 'WebExtension::ExtensionArchivePath',
|
|
42
|
+
base64: 'WebExtension::ExtensionBase64Encoded',
|
|
43
|
+
path: 'WebExtension::ExtensionPath'
|
|
44
|
+
)
|
|
45
|
+
end
|
|
46
|
+
|
|
47
|
+
# @api private
|
|
48
|
+
# @see https://www.selenium.dev/documentation/warnings/bidi-implementation/
|
|
49
|
+
ExtensionPath = Serialization::Record.define(
|
|
50
|
+
type: {fixed: 'path'},
|
|
51
|
+
path: {wire_key: 'path', primitive: 'string'}
|
|
52
|
+
)
|
|
53
|
+
|
|
54
|
+
# @api private
|
|
55
|
+
# @see https://www.selenium.dev/documentation/warnings/bidi-implementation/
|
|
56
|
+
ExtensionArchivePath = Serialization::Record.define(
|
|
57
|
+
type: {fixed: 'archivePath'},
|
|
58
|
+
path: {wire_key: 'path', primitive: 'string'}
|
|
59
|
+
)
|
|
60
|
+
|
|
61
|
+
# @api private
|
|
62
|
+
# @see https://www.selenium.dev/documentation/warnings/bidi-implementation/
|
|
63
|
+
ExtensionBase64Encoded = Serialization::Record.define(
|
|
64
|
+
type: {fixed: 'base64'},
|
|
65
|
+
value: {wire_key: 'value', primitive: 'string'}
|
|
66
|
+
)
|
|
67
|
+
|
|
68
|
+
# @api private
|
|
69
|
+
# @see https://www.selenium.dev/documentation/warnings/bidi-implementation/
|
|
70
|
+
InstallResult = Serialization::Record.define(extension: 'extension')
|
|
71
|
+
|
|
72
|
+
# @api private
|
|
73
|
+
# @see https://www.selenium.dev/documentation/warnings/bidi-implementation/
|
|
74
|
+
UninstallParameters = Serialization::Record.define(extension: 'extension')
|
|
75
|
+
|
|
76
|
+
# @api private
|
|
77
|
+
# @see https://www.selenium.dev/documentation/warnings/bidi-implementation/
|
|
78
|
+
def install(extension_data:)
|
|
79
|
+
params = InstallParameters.new(extension_data: extension_data)
|
|
80
|
+
execute(cmd: 'webExtension.install', params: params, result: WebExtension::InstallResult)
|
|
81
|
+
end
|
|
82
|
+
|
|
83
|
+
# @api private
|
|
84
|
+
# @see https://www.selenium.dev/documentation/warnings/bidi-implementation/
|
|
85
|
+
def uninstall(extension:)
|
|
86
|
+
params = UninstallParameters.new(extension: extension)
|
|
87
|
+
execute(cmd: 'webExtension.uninstall', params: params)
|
|
88
|
+
end
|
|
89
|
+
end # WebExtension
|
|
90
|
+
end # Protocol
|
|
91
|
+
end # BiDi
|
|
92
|
+
end # WebDriver
|
|
93
|
+
end # Selenium
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
3
|
+
# Licensed to the Software Freedom Conservancy (SFC) under one
|
|
4
|
+
# or more contributor license agreements. See the NOTICE file
|
|
5
|
+
# distributed with this work for additional information
|
|
6
|
+
# regarding copyright ownership. The SFC licenses this file
|
|
7
|
+
# to you under the Apache License, Version 2.0 (the
|
|
8
|
+
# "License"); you may not use this file except in compliance
|
|
9
|
+
# with the License. You may obtain a copy of the License at
|
|
10
|
+
#
|
|
11
|
+
# http://www.apache.org/licenses/LICENSE-2.0
|
|
12
|
+
#
|
|
13
|
+
# Unless required by applicable law or agreed to in writing,
|
|
14
|
+
# software distributed under the License is distributed on an
|
|
15
|
+
# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
|
|
16
|
+
# KIND, either express or implied. See the License for the
|
|
17
|
+
# specific language governing permissions and limitations
|
|
18
|
+
# under the License.
|
|
19
|
+
|
|
20
|
+
# serialization must load first (it defines the Serialization runtime the generated
|
|
21
|
+
# classes build on), then the Domain base the generated classes subclass. Add a require
|
|
22
|
+
# below when a new BiDi domain is generated.
|
|
23
|
+
require 'selenium/webdriver/bidi/serialization'
|
|
24
|
+
require 'selenium/webdriver/bidi/transport'
|
|
25
|
+
require 'selenium/webdriver/bidi/protocol/domain'
|
|
26
|
+
require 'selenium/webdriver/bidi/protocol/bluetooth'
|
|
27
|
+
require 'selenium/webdriver/bidi/protocol/browser'
|
|
28
|
+
require 'selenium/webdriver/bidi/protocol/browsing_context'
|
|
29
|
+
require 'selenium/webdriver/bidi/protocol/emulation'
|
|
30
|
+
require 'selenium/webdriver/bidi/protocol/input'
|
|
31
|
+
require 'selenium/webdriver/bidi/protocol/log'
|
|
32
|
+
require 'selenium/webdriver/bidi/protocol/network'
|
|
33
|
+
require 'selenium/webdriver/bidi/protocol/permissions'
|
|
34
|
+
require 'selenium/webdriver/bidi/protocol/script'
|
|
35
|
+
require 'selenium/webdriver/bidi/protocol/session'
|
|
36
|
+
require 'selenium/webdriver/bidi/protocol/speculation'
|
|
37
|
+
require 'selenium/webdriver/bidi/protocol/storage'
|
|
38
|
+
require 'selenium/webdriver/bidi/protocol/user_agent_client_hints'
|
|
39
|
+
require 'selenium/webdriver/bidi/protocol/web_extension'
|