selenium-webdriver 4.44.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 +19 -0
- data/Gemfile +1 -4
- data/README.md +1 -1
- 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/atoms/findElements.js +272 -68
- data/lib/selenium/webdriver/atoms/getAttribute.js +152 -17
- data/lib/selenium/webdriver/atoms/isDisplayed.js +385 -39
- 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/chromium/options.rb +3 -1
- data/lib/selenium/webdriver/chromium/profile.rb +6 -0
- data/lib/selenium/webdriver/common/client_config.rb +97 -0
- data/lib/selenium/webdriver/common/driver.rb +2 -2
- data/lib/selenium/webdriver/common/driver_finder.rb +32 -23
- data/lib/selenium/webdriver/common/local_driver.rb +19 -12
- data/lib/selenium/webdriver/common/proxy.rb +1 -1
- data/lib/selenium/webdriver/common/service.rb +1 -11
- 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/curb.rb +6 -8
- data/lib/selenium/webdriver/remote/http/default.rb +56 -39
- data/lib/selenium/webdriver/safari/driver.rb +3 -3
- data/lib/selenium/webdriver/safari/options.rb +8 -4
- data/lib/selenium/webdriver/safari.rb +1 -6
- data/lib/selenium/webdriver/support/guards/guard.rb +10 -11
- data/lib/selenium/webdriver/support/guards.rb +2 -1
- data/lib/selenium/webdriver/version.rb +1 -1
- data/selenium-webdriver.gemspec +1 -1
- metadata +27 -4
|
@@ -0,0 +1,465 @@
|
|
|
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 Bluetooth < Domain
|
|
30
|
+
EVENTS = {
|
|
31
|
+
request_device_prompt_updated: 'bluetooth.requestDevicePromptUpdated',
|
|
32
|
+
gatt_connection_attempted: 'bluetooth.gattConnectionAttempted'
|
|
33
|
+
}.freeze
|
|
34
|
+
|
|
35
|
+
SIMULATE_ADAPTER_PARAMETERS_STATE = {
|
|
36
|
+
absent: 'absent',
|
|
37
|
+
powered_off: 'powered-off',
|
|
38
|
+
powered_on: 'powered-on'
|
|
39
|
+
}.freeze
|
|
40
|
+
|
|
41
|
+
SIMULATE_SERVICE_PARAMETERS_TYPE = {
|
|
42
|
+
add: 'add',
|
|
43
|
+
remove: 'remove'
|
|
44
|
+
}.freeze
|
|
45
|
+
|
|
46
|
+
SIMULATE_CHARACTERISTIC_PARAMETERS_TYPE = {
|
|
47
|
+
add: 'add',
|
|
48
|
+
remove: 'remove'
|
|
49
|
+
}.freeze
|
|
50
|
+
|
|
51
|
+
SIMULATE_CHARACTERISTIC_RESPONSE_PARAMETERS_TYPE = {
|
|
52
|
+
read: 'read',
|
|
53
|
+
write: 'write',
|
|
54
|
+
subscribe_to_notifications: 'subscribe-to-notifications',
|
|
55
|
+
unsubscribe_from_notifications: 'unsubscribe-from-notifications'
|
|
56
|
+
}.freeze
|
|
57
|
+
|
|
58
|
+
SIMULATE_DESCRIPTOR_PARAMETERS_TYPE = {
|
|
59
|
+
add: 'add',
|
|
60
|
+
remove: 'remove'
|
|
61
|
+
}.freeze
|
|
62
|
+
|
|
63
|
+
SIMULATE_DESCRIPTOR_RESPONSE_PARAMETERS_TYPE = {
|
|
64
|
+
read: 'read',
|
|
65
|
+
write: 'write'
|
|
66
|
+
}.freeze
|
|
67
|
+
|
|
68
|
+
CHARACTERISTIC_EVENT_GENERATED_PARAMETERS_TYPE = {
|
|
69
|
+
read: 'read',
|
|
70
|
+
write_with_response: 'write-with-response',
|
|
71
|
+
write_without_response: 'write-without-response',
|
|
72
|
+
subscribe_to_notifications: 'subscribe-to-notifications',
|
|
73
|
+
unsubscribe_from_notifications: 'unsubscribe-from-notifications'
|
|
74
|
+
}.freeze
|
|
75
|
+
|
|
76
|
+
DESCRIPTOR_EVENT_GENERATED_PARAMETERS_TYPE = {
|
|
77
|
+
read: 'read',
|
|
78
|
+
write: 'write'
|
|
79
|
+
}.freeze
|
|
80
|
+
|
|
81
|
+
# @api private
|
|
82
|
+
# @see https://www.selenium.dev/documentation/warnings/bidi-implementation/
|
|
83
|
+
BluetoothManufacturerData = Serialization::Record.define(
|
|
84
|
+
key: {wire_key: 'key', primitive: 'integer'},
|
|
85
|
+
data: {wire_key: 'data', primitive: 'string'}
|
|
86
|
+
)
|
|
87
|
+
|
|
88
|
+
# @api private
|
|
89
|
+
# @see https://www.selenium.dev/documentation/warnings/bidi-implementation/
|
|
90
|
+
CharacteristicProperties = Serialization::Record.define(
|
|
91
|
+
broadcast: {wire_key: 'broadcast', required: false, primitive: 'boolean'},
|
|
92
|
+
read: {wire_key: 'read', required: false, primitive: 'boolean'},
|
|
93
|
+
write_without_response: {wire_key: 'writeWithoutResponse', required: false, primitive: 'boolean'},
|
|
94
|
+
write: {wire_key: 'write', required: false, primitive: 'boolean'},
|
|
95
|
+
notify: {wire_key: 'notify', required: false, primitive: 'boolean'},
|
|
96
|
+
indicate: {wire_key: 'indicate', required: false, primitive: 'boolean'},
|
|
97
|
+
authenticated_signed_writes: {wire_key: 'authenticatedSignedWrites', required: false, primitive: 'boolean'},
|
|
98
|
+
extended_properties: {wire_key: 'extendedProperties', required: false, primitive: 'boolean'}
|
|
99
|
+
)
|
|
100
|
+
|
|
101
|
+
# @api private
|
|
102
|
+
# @see https://www.selenium.dev/documentation/warnings/bidi-implementation/
|
|
103
|
+
RequestDeviceInfo = Serialization::Record.define(
|
|
104
|
+
id: 'id',
|
|
105
|
+
name: {wire_key: 'name', nullable: true, primitive: 'string'}
|
|
106
|
+
)
|
|
107
|
+
|
|
108
|
+
# @api private
|
|
109
|
+
# @see https://www.selenium.dev/documentation/warnings/bidi-implementation/
|
|
110
|
+
ScanRecord = Serialization::Record.define(
|
|
111
|
+
name: {wire_key: 'name', required: false, primitive: 'string'},
|
|
112
|
+
uuids: {wire_key: 'uuids', required: false, list: true},
|
|
113
|
+
appearance: {wire_key: 'appearance', required: false, primitive: 'number'},
|
|
114
|
+
manufacturer_data: {
|
|
115
|
+
wire_key: 'manufacturerData',
|
|
116
|
+
required: false,
|
|
117
|
+
ref: 'Bluetooth::BluetoothManufacturerData',
|
|
118
|
+
list: true
|
|
119
|
+
}
|
|
120
|
+
)
|
|
121
|
+
|
|
122
|
+
# @api private
|
|
123
|
+
# @see https://www.selenium.dev/documentation/warnings/bidi-implementation/
|
|
124
|
+
class HandleRequestDevicePromptParameters < Serialization::Union
|
|
125
|
+
discriminator 'accept'
|
|
126
|
+
variants(
|
|
127
|
+
true => 'Bluetooth::HandleRequestDevicePromptParameters::AcceptParameters',
|
|
128
|
+
false => 'Bluetooth::HandleRequestDevicePromptParameters::CancelParameters'
|
|
129
|
+
)
|
|
130
|
+
|
|
131
|
+
# @api private
|
|
132
|
+
# @see https://www.selenium.dev/documentation/warnings/bidi-implementation/
|
|
133
|
+
AcceptParameters = Serialization::Record.define(
|
|
134
|
+
accept: {fixed: true},
|
|
135
|
+
context: {wire_key: 'context', primitive: 'string'},
|
|
136
|
+
prompt: 'prompt',
|
|
137
|
+
device: 'device'
|
|
138
|
+
)
|
|
139
|
+
|
|
140
|
+
# @api private
|
|
141
|
+
# @see https://www.selenium.dev/documentation/warnings/bidi-implementation/
|
|
142
|
+
CancelParameters = Serialization::Record.define(
|
|
143
|
+
accept: {fixed: false},
|
|
144
|
+
context: {wire_key: 'context', primitive: 'string'},
|
|
145
|
+
prompt: 'prompt'
|
|
146
|
+
)
|
|
147
|
+
end
|
|
148
|
+
|
|
149
|
+
# @api private
|
|
150
|
+
# @see https://www.selenium.dev/documentation/warnings/bidi-implementation/
|
|
151
|
+
SimulateAdapterParameters = Serialization::Record.define(
|
|
152
|
+
context: {wire_key: 'context', primitive: 'string'},
|
|
153
|
+
le_supported: {wire_key: 'leSupported', required: false, primitive: 'boolean'},
|
|
154
|
+
state: {wire_key: 'state', enum: 'Bluetooth::SIMULATE_ADAPTER_PARAMETERS_STATE'}
|
|
155
|
+
)
|
|
156
|
+
|
|
157
|
+
# @api private
|
|
158
|
+
# @see https://www.selenium.dev/documentation/warnings/bidi-implementation/
|
|
159
|
+
DisableSimulationParameters = Serialization::Record.define(
|
|
160
|
+
context: {wire_key: 'context', primitive: 'string'}
|
|
161
|
+
)
|
|
162
|
+
|
|
163
|
+
# @api private
|
|
164
|
+
# @see https://www.selenium.dev/documentation/warnings/bidi-implementation/
|
|
165
|
+
SimulatePreconnectedPeripheralParameters = Serialization::Record.define(
|
|
166
|
+
context: {wire_key: 'context', primitive: 'string'},
|
|
167
|
+
address: {wire_key: 'address', primitive: 'string'},
|
|
168
|
+
name: {wire_key: 'name', primitive: 'string'},
|
|
169
|
+
manufacturer_data: {wire_key: 'manufacturerData', ref: 'Bluetooth::BluetoothManufacturerData', list: true},
|
|
170
|
+
known_service_uuids: {wire_key: 'knownServiceUuids', list: true}
|
|
171
|
+
)
|
|
172
|
+
|
|
173
|
+
# @api private
|
|
174
|
+
# @see https://www.selenium.dev/documentation/warnings/bidi-implementation/
|
|
175
|
+
SimulateAdvertisementParameters = Serialization::Record.define(
|
|
176
|
+
context: {wire_key: 'context', primitive: 'string'},
|
|
177
|
+
scan_entry: {wire_key: 'scanEntry', ref: 'Bluetooth::SimulateAdvertisementScanEntryParameters'}
|
|
178
|
+
)
|
|
179
|
+
|
|
180
|
+
# @api private
|
|
181
|
+
# @see https://www.selenium.dev/documentation/warnings/bidi-implementation/
|
|
182
|
+
SimulateAdvertisementScanEntryParameters = Serialization::Record.define(
|
|
183
|
+
device_address: {wire_key: 'deviceAddress', primitive: 'string'},
|
|
184
|
+
rssi: {wire_key: 'rssi', primitive: 'number'},
|
|
185
|
+
scan_record: {wire_key: 'scanRecord', ref: 'Bluetooth::ScanRecord'}
|
|
186
|
+
)
|
|
187
|
+
|
|
188
|
+
# @api private
|
|
189
|
+
# @see https://www.selenium.dev/documentation/warnings/bidi-implementation/
|
|
190
|
+
SimulateGattConnectionResponseParameters = Serialization::Record.define(
|
|
191
|
+
context: {wire_key: 'context', primitive: 'string'},
|
|
192
|
+
address: {wire_key: 'address', primitive: 'string'},
|
|
193
|
+
code: {wire_key: 'code', primitive: 'integer'}
|
|
194
|
+
)
|
|
195
|
+
|
|
196
|
+
# @api private
|
|
197
|
+
# @see https://www.selenium.dev/documentation/warnings/bidi-implementation/
|
|
198
|
+
SimulateGattDisconnectionParameters = Serialization::Record.define(
|
|
199
|
+
context: {wire_key: 'context', primitive: 'string'},
|
|
200
|
+
address: {wire_key: 'address', primitive: 'string'}
|
|
201
|
+
)
|
|
202
|
+
|
|
203
|
+
# @api private
|
|
204
|
+
# @see https://www.selenium.dev/documentation/warnings/bidi-implementation/
|
|
205
|
+
SimulateServiceParameters = Serialization::Record.define(
|
|
206
|
+
context: {wire_key: 'context', primitive: 'string'},
|
|
207
|
+
address: {wire_key: 'address', primitive: 'string'},
|
|
208
|
+
uuid: 'uuid',
|
|
209
|
+
type: {wire_key: 'type', enum: 'Bluetooth::SIMULATE_SERVICE_PARAMETERS_TYPE'}
|
|
210
|
+
)
|
|
211
|
+
|
|
212
|
+
# @api private
|
|
213
|
+
# @see https://www.selenium.dev/documentation/warnings/bidi-implementation/
|
|
214
|
+
SimulateCharacteristicParameters = Serialization::Record.define(
|
|
215
|
+
context: {wire_key: 'context', primitive: 'string'},
|
|
216
|
+
address: {wire_key: 'address', primitive: 'string'},
|
|
217
|
+
service_uuid: 'serviceUuid',
|
|
218
|
+
characteristic_uuid: 'characteristicUuid',
|
|
219
|
+
characteristic_properties: {
|
|
220
|
+
wire_key: 'characteristicProperties',
|
|
221
|
+
required: false,
|
|
222
|
+
ref: 'Bluetooth::CharacteristicProperties'
|
|
223
|
+
},
|
|
224
|
+
type: {wire_key: 'type', enum: 'Bluetooth::SIMULATE_CHARACTERISTIC_PARAMETERS_TYPE'}
|
|
225
|
+
)
|
|
226
|
+
|
|
227
|
+
# @api private
|
|
228
|
+
# @see https://www.selenium.dev/documentation/warnings/bidi-implementation/
|
|
229
|
+
SimulateCharacteristicResponseParameters = Serialization::Record.define(
|
|
230
|
+
context: {wire_key: 'context', primitive: 'string'},
|
|
231
|
+
address: {wire_key: 'address', primitive: 'string'},
|
|
232
|
+
service_uuid: 'serviceUuid',
|
|
233
|
+
characteristic_uuid: 'characteristicUuid',
|
|
234
|
+
type: {wire_key: 'type', enum: 'Bluetooth::SIMULATE_CHARACTERISTIC_RESPONSE_PARAMETERS_TYPE'},
|
|
235
|
+
code: {wire_key: 'code', primitive: 'integer'},
|
|
236
|
+
data: {wire_key: 'data', required: false, list: true}
|
|
237
|
+
)
|
|
238
|
+
|
|
239
|
+
# @api private
|
|
240
|
+
# @see https://www.selenium.dev/documentation/warnings/bidi-implementation/
|
|
241
|
+
SimulateDescriptorParameters = Serialization::Record.define(
|
|
242
|
+
context: {wire_key: 'context', primitive: 'string'},
|
|
243
|
+
address: {wire_key: 'address', primitive: 'string'},
|
|
244
|
+
service_uuid: 'serviceUuid',
|
|
245
|
+
characteristic_uuid: 'characteristicUuid',
|
|
246
|
+
descriptor_uuid: 'descriptorUuid',
|
|
247
|
+
type: {wire_key: 'type', enum: 'Bluetooth::SIMULATE_DESCRIPTOR_PARAMETERS_TYPE'}
|
|
248
|
+
)
|
|
249
|
+
|
|
250
|
+
# @api private
|
|
251
|
+
# @see https://www.selenium.dev/documentation/warnings/bidi-implementation/
|
|
252
|
+
SimulateDescriptorResponseParameters = Serialization::Record.define(
|
|
253
|
+
context: {wire_key: 'context', primitive: 'string'},
|
|
254
|
+
address: {wire_key: 'address', primitive: 'string'},
|
|
255
|
+
service_uuid: 'serviceUuid',
|
|
256
|
+
characteristic_uuid: 'characteristicUuid',
|
|
257
|
+
descriptor_uuid: 'descriptorUuid',
|
|
258
|
+
type: {wire_key: 'type', enum: 'Bluetooth::SIMULATE_DESCRIPTOR_RESPONSE_PARAMETERS_TYPE'},
|
|
259
|
+
code: {wire_key: 'code', primitive: 'integer'},
|
|
260
|
+
data: {wire_key: 'data', required: false, list: true}
|
|
261
|
+
)
|
|
262
|
+
|
|
263
|
+
# @api private
|
|
264
|
+
# @see https://www.selenium.dev/documentation/warnings/bidi-implementation/
|
|
265
|
+
RequestDevicePromptUpdatedParameters = Serialization::Record.define(
|
|
266
|
+
context: {wire_key: 'context', primitive: 'string'},
|
|
267
|
+
prompt: 'prompt',
|
|
268
|
+
devices: {wire_key: 'devices', ref: 'Bluetooth::RequestDeviceInfo', list: true}
|
|
269
|
+
)
|
|
270
|
+
|
|
271
|
+
# @api private
|
|
272
|
+
# @see https://www.selenium.dev/documentation/warnings/bidi-implementation/
|
|
273
|
+
GattConnectionAttemptedParameters = Serialization::Record.define(
|
|
274
|
+
context: {wire_key: 'context', primitive: 'string'},
|
|
275
|
+
address: {wire_key: 'address', primitive: 'string'}
|
|
276
|
+
)
|
|
277
|
+
|
|
278
|
+
# @api private
|
|
279
|
+
# @see https://www.selenium.dev/documentation/warnings/bidi-implementation/
|
|
280
|
+
CharacteristicEventGeneratedParameters = Serialization::Record.define(
|
|
281
|
+
context: {wire_key: 'context', primitive: 'string'},
|
|
282
|
+
address: {wire_key: 'address', primitive: 'string'},
|
|
283
|
+
service_uuid: 'serviceUuid',
|
|
284
|
+
characteristic_uuid: 'characteristicUuid',
|
|
285
|
+
type: {wire_key: 'type', enum: 'Bluetooth::CHARACTERISTIC_EVENT_GENERATED_PARAMETERS_TYPE'},
|
|
286
|
+
data: {wire_key: 'data', required: false, list: true}
|
|
287
|
+
)
|
|
288
|
+
|
|
289
|
+
# @api private
|
|
290
|
+
# @see https://www.selenium.dev/documentation/warnings/bidi-implementation/
|
|
291
|
+
DescriptorEventGeneratedParameters = Serialization::Record.define(
|
|
292
|
+
context: {wire_key: 'context', primitive: 'string'},
|
|
293
|
+
address: {wire_key: 'address', primitive: 'string'},
|
|
294
|
+
service_uuid: 'serviceUuid',
|
|
295
|
+
characteristic_uuid: 'characteristicUuid',
|
|
296
|
+
descriptor_uuid: 'descriptorUuid',
|
|
297
|
+
type: {wire_key: 'type', enum: 'Bluetooth::DESCRIPTOR_EVENT_GENERATED_PARAMETERS_TYPE'},
|
|
298
|
+
data: {wire_key: 'data', required: false, list: true}
|
|
299
|
+
)
|
|
300
|
+
|
|
301
|
+
EVENT_TYPES = {
|
|
302
|
+
'bluetooth.requestDevicePromptUpdated' => Bluetooth::RequestDevicePromptUpdatedParameters,
|
|
303
|
+
'bluetooth.gattConnectionAttempted' => Bluetooth::GattConnectionAttemptedParameters
|
|
304
|
+
}.freeze
|
|
305
|
+
|
|
306
|
+
# @api private
|
|
307
|
+
# @see https://www.selenium.dev/documentation/warnings/bidi-implementation/
|
|
308
|
+
def handle_request_device_prompt(context:, prompt:, accept:, device: Serialization::UNSET)
|
|
309
|
+
params = HandleRequestDevicePromptParameters.build(
|
|
310
|
+
context: context,
|
|
311
|
+
prompt: prompt,
|
|
312
|
+
accept: accept,
|
|
313
|
+
device: device
|
|
314
|
+
)
|
|
315
|
+
execute(cmd: 'bluetooth.handleRequestDevicePrompt', params: params)
|
|
316
|
+
end
|
|
317
|
+
|
|
318
|
+
# @api private
|
|
319
|
+
# @see https://www.selenium.dev/documentation/warnings/bidi-implementation/
|
|
320
|
+
def simulate_adapter(context:, state:, le_supported: Serialization::UNSET)
|
|
321
|
+
Serialization.validate!('state', state, Bluetooth::SIMULATE_ADAPTER_PARAMETERS_STATE)
|
|
322
|
+
params = SimulateAdapterParameters.new(context: context, le_supported: le_supported, state: state)
|
|
323
|
+
execute(cmd: 'bluetooth.simulateAdapter', params: params)
|
|
324
|
+
end
|
|
325
|
+
|
|
326
|
+
# @api private
|
|
327
|
+
# @see https://www.selenium.dev/documentation/warnings/bidi-implementation/
|
|
328
|
+
def disable_simulation(context:)
|
|
329
|
+
params = DisableSimulationParameters.new(context: context)
|
|
330
|
+
execute(cmd: 'bluetooth.disableSimulation', params: params)
|
|
331
|
+
end
|
|
332
|
+
|
|
333
|
+
# @api private
|
|
334
|
+
# @see https://www.selenium.dev/documentation/warnings/bidi-implementation/
|
|
335
|
+
def simulate_preconnected_peripheral(context:, address:, name:, manufacturer_data:, known_service_uuids:)
|
|
336
|
+
params = SimulatePreconnectedPeripheralParameters.new(
|
|
337
|
+
context: context,
|
|
338
|
+
address: address,
|
|
339
|
+
name: name,
|
|
340
|
+
manufacturer_data: manufacturer_data,
|
|
341
|
+
known_service_uuids: known_service_uuids
|
|
342
|
+
)
|
|
343
|
+
execute(cmd: 'bluetooth.simulatePreconnectedPeripheral', params: params)
|
|
344
|
+
end
|
|
345
|
+
|
|
346
|
+
# @api private
|
|
347
|
+
# @see https://www.selenium.dev/documentation/warnings/bidi-implementation/
|
|
348
|
+
def simulate_advertisement(context:, scan_entry:)
|
|
349
|
+
params = SimulateAdvertisementParameters.new(context: context, scan_entry: scan_entry)
|
|
350
|
+
execute(cmd: 'bluetooth.simulateAdvertisement', params: params)
|
|
351
|
+
end
|
|
352
|
+
|
|
353
|
+
# @api private
|
|
354
|
+
# @see https://www.selenium.dev/documentation/warnings/bidi-implementation/
|
|
355
|
+
def simulate_gatt_connection_response(context:, address:, code:)
|
|
356
|
+
params = SimulateGattConnectionResponseParameters.new(context: context, address: address, code: code)
|
|
357
|
+
execute(cmd: 'bluetooth.simulateGattConnectionResponse', params: params)
|
|
358
|
+
end
|
|
359
|
+
|
|
360
|
+
# @api private
|
|
361
|
+
# @see https://www.selenium.dev/documentation/warnings/bidi-implementation/
|
|
362
|
+
def simulate_gatt_disconnection(context:, address:)
|
|
363
|
+
params = SimulateGattDisconnectionParameters.new(context: context, address: address)
|
|
364
|
+
execute(cmd: 'bluetooth.simulateGattDisconnection', params: params)
|
|
365
|
+
end
|
|
366
|
+
|
|
367
|
+
# @api private
|
|
368
|
+
# @see https://www.selenium.dev/documentation/warnings/bidi-implementation/
|
|
369
|
+
def simulate_service(context:, address:, uuid:, type:)
|
|
370
|
+
Serialization.validate!('type', type, Bluetooth::SIMULATE_SERVICE_PARAMETERS_TYPE)
|
|
371
|
+
params = SimulateServiceParameters.new(context: context, address: address, uuid: uuid, type: type)
|
|
372
|
+
execute(cmd: 'bluetooth.simulateService', params: params)
|
|
373
|
+
end
|
|
374
|
+
|
|
375
|
+
# @api private
|
|
376
|
+
# @see https://www.selenium.dev/documentation/warnings/bidi-implementation/
|
|
377
|
+
def simulate_characteristic(
|
|
378
|
+
context:,
|
|
379
|
+
address:,
|
|
380
|
+
service_uuid:,
|
|
381
|
+
characteristic_uuid:,
|
|
382
|
+
type:,
|
|
383
|
+
characteristic_properties: Serialization::UNSET
|
|
384
|
+
)
|
|
385
|
+
Serialization.validate!('type', type, Bluetooth::SIMULATE_CHARACTERISTIC_PARAMETERS_TYPE)
|
|
386
|
+
params = SimulateCharacteristicParameters.new(
|
|
387
|
+
context: context,
|
|
388
|
+
address: address,
|
|
389
|
+
service_uuid: service_uuid,
|
|
390
|
+
characteristic_uuid: characteristic_uuid,
|
|
391
|
+
characteristic_properties: characteristic_properties,
|
|
392
|
+
type: type
|
|
393
|
+
)
|
|
394
|
+
execute(cmd: 'bluetooth.simulateCharacteristic', params: params)
|
|
395
|
+
end
|
|
396
|
+
|
|
397
|
+
# @api private
|
|
398
|
+
# @see https://www.selenium.dev/documentation/warnings/bidi-implementation/
|
|
399
|
+
def simulate_characteristic_response(
|
|
400
|
+
context:,
|
|
401
|
+
address:,
|
|
402
|
+
service_uuid:,
|
|
403
|
+
characteristic_uuid:,
|
|
404
|
+
type:,
|
|
405
|
+
code:,
|
|
406
|
+
data: Serialization::UNSET
|
|
407
|
+
)
|
|
408
|
+
Serialization.validate!('type', type, Bluetooth::SIMULATE_CHARACTERISTIC_RESPONSE_PARAMETERS_TYPE)
|
|
409
|
+
params = SimulateCharacteristicResponseParameters.new(
|
|
410
|
+
context: context,
|
|
411
|
+
address: address,
|
|
412
|
+
service_uuid: service_uuid,
|
|
413
|
+
characteristic_uuid: characteristic_uuid,
|
|
414
|
+
type: type,
|
|
415
|
+
code: code,
|
|
416
|
+
data: data
|
|
417
|
+
)
|
|
418
|
+
execute(cmd: 'bluetooth.simulateCharacteristicResponse', params: params)
|
|
419
|
+
end
|
|
420
|
+
|
|
421
|
+
# @api private
|
|
422
|
+
# @see https://www.selenium.dev/documentation/warnings/bidi-implementation/
|
|
423
|
+
def simulate_descriptor(context:, address:, service_uuid:, characteristic_uuid:, descriptor_uuid:, type:)
|
|
424
|
+
Serialization.validate!('type', type, Bluetooth::SIMULATE_DESCRIPTOR_PARAMETERS_TYPE)
|
|
425
|
+
params = SimulateDescriptorParameters.new(
|
|
426
|
+
context: context,
|
|
427
|
+
address: address,
|
|
428
|
+
service_uuid: service_uuid,
|
|
429
|
+
characteristic_uuid: characteristic_uuid,
|
|
430
|
+
descriptor_uuid: descriptor_uuid,
|
|
431
|
+
type: type
|
|
432
|
+
)
|
|
433
|
+
execute(cmd: 'bluetooth.simulateDescriptor', params: params)
|
|
434
|
+
end
|
|
435
|
+
|
|
436
|
+
# @api private
|
|
437
|
+
# @see https://www.selenium.dev/documentation/warnings/bidi-implementation/
|
|
438
|
+
def simulate_descriptor_response(
|
|
439
|
+
context:,
|
|
440
|
+
address:,
|
|
441
|
+
service_uuid:,
|
|
442
|
+
characteristic_uuid:,
|
|
443
|
+
descriptor_uuid:,
|
|
444
|
+
type:,
|
|
445
|
+
code:,
|
|
446
|
+
data: Serialization::UNSET
|
|
447
|
+
)
|
|
448
|
+
Serialization.validate!('type', type, Bluetooth::SIMULATE_DESCRIPTOR_RESPONSE_PARAMETERS_TYPE)
|
|
449
|
+
params = SimulateDescriptorResponseParameters.new(
|
|
450
|
+
context: context,
|
|
451
|
+
address: address,
|
|
452
|
+
service_uuid: service_uuid,
|
|
453
|
+
characteristic_uuid: characteristic_uuid,
|
|
454
|
+
descriptor_uuid: descriptor_uuid,
|
|
455
|
+
type: type,
|
|
456
|
+
code: code,
|
|
457
|
+
data: data
|
|
458
|
+
)
|
|
459
|
+
execute(cmd: 'bluetooth.simulateDescriptorResponse', params: params)
|
|
460
|
+
end
|
|
461
|
+
end # Bluetooth
|
|
462
|
+
end # Protocol
|
|
463
|
+
end # BiDi
|
|
464
|
+
end # WebDriver
|
|
465
|
+
end # Selenium
|
|
@@ -0,0 +1,222 @@
|
|
|
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 Browser < Domain
|
|
30
|
+
CLIENT_WINDOW_INFO_STATE = {
|
|
31
|
+
fullscreen: 'fullscreen',
|
|
32
|
+
maximized: 'maximized',
|
|
33
|
+
minimized: 'minimized',
|
|
34
|
+
normal: 'normal'
|
|
35
|
+
}.freeze
|
|
36
|
+
|
|
37
|
+
CLIENT_WINDOW_NAMED_STATE_STATE = {
|
|
38
|
+
fullscreen: 'fullscreen',
|
|
39
|
+
maximized: 'maximized',
|
|
40
|
+
minimized: 'minimized'
|
|
41
|
+
}.freeze
|
|
42
|
+
|
|
43
|
+
# @api private
|
|
44
|
+
# @see https://www.selenium.dev/documentation/warnings/bidi-implementation/
|
|
45
|
+
ClientWindowInfo = Serialization::Record.define(
|
|
46
|
+
active: {wire_key: 'active', primitive: 'boolean'},
|
|
47
|
+
client_window: 'clientWindow',
|
|
48
|
+
height: 'height',
|
|
49
|
+
state: {wire_key: 'state', enum: 'Browser::CLIENT_WINDOW_INFO_STATE'},
|
|
50
|
+
width: 'width',
|
|
51
|
+
x: 'x',
|
|
52
|
+
y: 'y'
|
|
53
|
+
)
|
|
54
|
+
|
|
55
|
+
# @api private
|
|
56
|
+
# @see https://www.selenium.dev/documentation/warnings/bidi-implementation/
|
|
57
|
+
UserContextInfo = Serialization::Record.define(user_context: 'userContext')
|
|
58
|
+
|
|
59
|
+
# @api private
|
|
60
|
+
# @see https://www.selenium.dev/documentation/warnings/bidi-implementation/
|
|
61
|
+
CreateUserContextParameters = Serialization::Record.define(
|
|
62
|
+
accept_insecure_certs: {wire_key: 'acceptInsecureCerts', required: false, primitive: 'boolean'},
|
|
63
|
+
proxy: {wire_key: 'proxy', required: false, ref: 'Session::ProxyConfiguration'},
|
|
64
|
+
unhandled_prompt_behavior: {
|
|
65
|
+
wire_key: 'unhandledPromptBehavior',
|
|
66
|
+
required: false,
|
|
67
|
+
ref: 'Session::UserPromptHandler'
|
|
68
|
+
}
|
|
69
|
+
)
|
|
70
|
+
|
|
71
|
+
# @api private
|
|
72
|
+
# @see https://www.selenium.dev/documentation/warnings/bidi-implementation/
|
|
73
|
+
GetClientWindowsResult = Serialization::Record.define(
|
|
74
|
+
client_windows: {wire_key: 'clientWindows', ref: 'Browser::ClientWindowInfo', list: true}
|
|
75
|
+
)
|
|
76
|
+
|
|
77
|
+
# @api private
|
|
78
|
+
# @see https://www.selenium.dev/documentation/warnings/bidi-implementation/
|
|
79
|
+
GetUserContextsResult = Serialization::Record.define(
|
|
80
|
+
user_contexts: {wire_key: 'userContexts', ref: 'Browser::UserContextInfo', list: true}
|
|
81
|
+
)
|
|
82
|
+
|
|
83
|
+
# @api private
|
|
84
|
+
# @see https://www.selenium.dev/documentation/warnings/bidi-implementation/
|
|
85
|
+
RemoveUserContextParameters = Serialization::Record.define(user_context: 'userContext')
|
|
86
|
+
|
|
87
|
+
# @api private
|
|
88
|
+
# @see https://www.selenium.dev/documentation/warnings/bidi-implementation/
|
|
89
|
+
class SetClientWindowStateParameters < Serialization::Union
|
|
90
|
+
discriminator 'state', {normal: 'normal'}
|
|
91
|
+
variants(
|
|
92
|
+
normal: 'Browser::SetClientWindowStateParameters::ClientWindowRectState'
|
|
93
|
+
)
|
|
94
|
+
fallback 'Browser::SetClientWindowStateParameters::ClientWindowNamedState'
|
|
95
|
+
|
|
96
|
+
# @api private
|
|
97
|
+
# @see https://www.selenium.dev/documentation/warnings/bidi-implementation/
|
|
98
|
+
ClientWindowNamedState = Serialization::Record.define(
|
|
99
|
+
client_window: 'clientWindow',
|
|
100
|
+
state: {wire_key: 'state', enum: 'Browser::CLIENT_WINDOW_NAMED_STATE_STATE'}
|
|
101
|
+
)
|
|
102
|
+
|
|
103
|
+
# @api private
|
|
104
|
+
# @see https://www.selenium.dev/documentation/warnings/bidi-implementation/
|
|
105
|
+
ClientWindowRectState = Serialization::Record.define(
|
|
106
|
+
state: {fixed: 'normal'},
|
|
107
|
+
client_window: 'clientWindow',
|
|
108
|
+
width: {wire_key: 'width', required: false},
|
|
109
|
+
height: {wire_key: 'height', required: false},
|
|
110
|
+
x: {wire_key: 'x', required: false},
|
|
111
|
+
y: {wire_key: 'y', required: false}
|
|
112
|
+
)
|
|
113
|
+
end
|
|
114
|
+
|
|
115
|
+
# @api private
|
|
116
|
+
# @see https://www.selenium.dev/documentation/warnings/bidi-implementation/
|
|
117
|
+
SetDownloadBehaviorParameters = Serialization::Record.define(
|
|
118
|
+
download_behavior: {wire_key: 'downloadBehavior', nullable: true, ref: 'Browser::DownloadBehavior'},
|
|
119
|
+
user_contexts: {wire_key: 'userContexts', required: false, list: true}
|
|
120
|
+
)
|
|
121
|
+
|
|
122
|
+
# @api private
|
|
123
|
+
# @see https://www.selenium.dev/documentation/warnings/bidi-implementation/
|
|
124
|
+
class DownloadBehavior < Serialization::Union
|
|
125
|
+
discriminator 'type', {allowed: 'allowed', denied: 'denied'}
|
|
126
|
+
variants(
|
|
127
|
+
allowed: 'Browser::DownloadBehavior::Allowed',
|
|
128
|
+
denied: 'Browser::DownloadBehavior::Denied'
|
|
129
|
+
)
|
|
130
|
+
|
|
131
|
+
# @api private
|
|
132
|
+
# @see https://www.selenium.dev/documentation/warnings/bidi-implementation/
|
|
133
|
+
Allowed = Serialization::Record.define(
|
|
134
|
+
type: {fixed: 'allowed'},
|
|
135
|
+
destination_folder: {wire_key: 'destinationFolder', primitive: 'string'}
|
|
136
|
+
)
|
|
137
|
+
|
|
138
|
+
# @api private
|
|
139
|
+
# @see https://www.selenium.dev/documentation/warnings/bidi-implementation/
|
|
140
|
+
Denied = Serialization::Record.define(type: {fixed: 'denied'})
|
|
141
|
+
end
|
|
142
|
+
|
|
143
|
+
# @api private
|
|
144
|
+
# @see https://www.selenium.dev/documentation/warnings/bidi-implementation/
|
|
145
|
+
def close
|
|
146
|
+
execute(cmd: 'browser.close')
|
|
147
|
+
end
|
|
148
|
+
|
|
149
|
+
# @api private
|
|
150
|
+
# @see https://www.selenium.dev/documentation/warnings/bidi-implementation/
|
|
151
|
+
def create_user_context(
|
|
152
|
+
accept_insecure_certs: Serialization::UNSET,
|
|
153
|
+
proxy: Serialization::UNSET,
|
|
154
|
+
unhandled_prompt_behavior: Serialization::UNSET
|
|
155
|
+
)
|
|
156
|
+
params = CreateUserContextParameters.new(
|
|
157
|
+
accept_insecure_certs: accept_insecure_certs,
|
|
158
|
+
proxy: proxy,
|
|
159
|
+
unhandled_prompt_behavior: unhandled_prompt_behavior
|
|
160
|
+
)
|
|
161
|
+
execute(cmd: 'browser.createUserContext', params: params, result: Browser::UserContextInfo)
|
|
162
|
+
end
|
|
163
|
+
|
|
164
|
+
# @api private
|
|
165
|
+
# @see https://www.selenium.dev/documentation/warnings/bidi-implementation/
|
|
166
|
+
def get_client_windows
|
|
167
|
+
execute(cmd: 'browser.getClientWindows', result: Browser::GetClientWindowsResult)
|
|
168
|
+
end
|
|
169
|
+
|
|
170
|
+
# @api private
|
|
171
|
+
# @see https://www.selenium.dev/documentation/warnings/bidi-implementation/
|
|
172
|
+
def get_user_contexts
|
|
173
|
+
execute(cmd: 'browser.getUserContexts', result: Browser::GetUserContextsResult)
|
|
174
|
+
end
|
|
175
|
+
|
|
176
|
+
# @api private
|
|
177
|
+
# @see https://www.selenium.dev/documentation/warnings/bidi-implementation/
|
|
178
|
+
def remove_user_context(user_context:)
|
|
179
|
+
params = RemoveUserContextParameters.new(user_context: user_context)
|
|
180
|
+
execute(cmd: 'browser.removeUserContext', params: params)
|
|
181
|
+
end
|
|
182
|
+
|
|
183
|
+
# @api private
|
|
184
|
+
# @see https://www.selenium.dev/documentation/warnings/bidi-implementation/
|
|
185
|
+
def set_client_window_state(
|
|
186
|
+
client_window:,
|
|
187
|
+
state:,
|
|
188
|
+
width: Serialization::UNSET,
|
|
189
|
+
height: Serialization::UNSET,
|
|
190
|
+
x: Serialization::UNSET,
|
|
191
|
+
y: Serialization::UNSET
|
|
192
|
+
)
|
|
193
|
+
Serialization.validate!(
|
|
194
|
+
'state',
|
|
195
|
+
state,
|
|
196
|
+
{normal: 'normal', fullscreen: 'fullscreen', maximized: 'maximized', minimized: 'minimized'}
|
|
197
|
+
)
|
|
198
|
+
params = SetClientWindowStateParameters.build(
|
|
199
|
+
client_window: client_window,
|
|
200
|
+
state: state,
|
|
201
|
+
width: width,
|
|
202
|
+
height: height,
|
|
203
|
+
x: x,
|
|
204
|
+
y: y
|
|
205
|
+
)
|
|
206
|
+
execute(cmd: 'browser.setClientWindowState', params: params, result: Browser::ClientWindowInfo)
|
|
207
|
+
end
|
|
208
|
+
|
|
209
|
+
# @api private
|
|
210
|
+
# @see https://www.selenium.dev/documentation/warnings/bidi-implementation/
|
|
211
|
+
def set_download_behavior(download_behavior:, user_contexts: Serialization::UNSET)
|
|
212
|
+
params = SetDownloadBehaviorParameters.new(
|
|
213
|
+
download_behavior: download_behavior,
|
|
214
|
+
user_contexts: user_contexts
|
|
215
|
+
)
|
|
216
|
+
execute(cmd: 'browser.setDownloadBehavior', params: params)
|
|
217
|
+
end
|
|
218
|
+
end # Browser
|
|
219
|
+
end # Protocol
|
|
220
|
+
end # BiDi
|
|
221
|
+
end # WebDriver
|
|
222
|
+
end # Selenium
|