selenium-webdriver 4.46.0 → 4.47.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 +29 -0
- data/bin/linux/selenium-manager +0 -0
- data/bin/macos/selenium-manager +0 -0
- data/bin/selenium-manager-THIRD-PARTY-NOTICES.txt +5971 -0
- data/bin/selenium-manager.cdx.json +11629 -0
- data/bin/windows/selenium-manager.exe +0 -0
- data/lib/selenium/webdriver/{common/driver_extensions/has_bidi.rb → bidi/error.rb} +21 -13
- data/lib/selenium/webdriver/bidi/protocol/bluetooth.rb +53 -23
- data/lib/selenium/webdriver/bidi/protocol/browser.rb +43 -15
- data/lib/selenium/webdriver/bidi/protocol/browsing_context.rb +172 -68
- data/lib/selenium/webdriver/bidi/protocol/domain.rb +8 -2
- data/lib/selenium/webdriver/bidi/protocol/emulation.rb +123 -9
- data/lib/selenium/webdriver/bidi/protocol/error_code.rb +66 -0
- data/lib/selenium/webdriver/bidi/protocol/input.rb +101 -28
- data/lib/selenium/webdriver/bidi/protocol/log.rb +17 -6
- data/lib/selenium/webdriver/bidi/protocol/network.rb +146 -63
- data/lib/selenium/webdriver/bidi/protocol/permissions.rb +4 -2
- data/lib/selenium/webdriver/bidi/protocol/script.rb +264 -86
- data/lib/selenium/webdriver/bidi/protocol/session.rb +48 -3
- data/lib/selenium/webdriver/bidi/protocol/speculation.rb +4 -2
- data/lib/selenium/webdriver/bidi/protocol/storage.rb +32 -6
- data/lib/selenium/webdriver/bidi/protocol/user_agent_client_hints.rb +7 -2
- data/lib/selenium/webdriver/bidi/protocol/web_extension.rb +49 -10
- data/lib/selenium/webdriver/bidi/protocol.rb +3 -0
- data/lib/selenium/webdriver/bidi/serialization/record.rb +194 -18
- data/lib/selenium/webdriver/bidi/serialization/union.rb +45 -3
- data/lib/selenium/webdriver/bidi/serialization.rb +13 -1
- data/lib/selenium/webdriver/bidi/support/bidi_generate.rb +529 -45
- data/lib/selenium/webdriver/bidi/support/check_generated.rb +12 -4
- data/lib/selenium/webdriver/bidi/transport.rb +8 -3
- data/lib/selenium/webdriver/chrome/service.rb +4 -1
- data/lib/selenium/webdriver/chromium/driver.rb +0 -1
- data/lib/selenium/webdriver/chromium/options.rb +20 -0
- data/lib/selenium/webdriver/common/driver.rb +11 -0
- data/lib/selenium/webdriver/common/driver_extensions/has_log_events.rb +0 -7
- data/lib/selenium/webdriver/common/driver_extensions/has_network_interception.rb +0 -7
- data/lib/selenium/webdriver/common/driver_finder.rb +4 -3
- data/lib/selenium/webdriver/common/options.rb +21 -1
- data/lib/selenium/webdriver/common/proxy.rb +0 -8
- data/lib/selenium/webdriver/common/selenium_manager.rb +2 -1
- data/lib/selenium/webdriver/common/takes_screenshot.rb +1 -1
- data/lib/selenium/webdriver/common.rb +0 -1
- data/lib/selenium/webdriver/edge/service.rb +4 -1
- data/lib/selenium/webdriver/firefox/driver.rb +0 -3
- data/lib/selenium/webdriver/firefox/options.rb +19 -0
- data/lib/selenium/webdriver/firefox/profile.rb +13 -6
- data/lib/selenium/webdriver/remote/bidi_bridge.rb +39 -12
- data/lib/selenium/webdriver/remote/bridge.rb +1 -1
- data/lib/selenium/webdriver/remote/driver.rb +3 -1
- data/lib/selenium/webdriver/remote/http/default.rb +1 -1
- data/lib/selenium/webdriver/safari/options.rb +16 -1
- data/lib/selenium/webdriver/support/guards/guard.rb +20 -3
- data/lib/selenium/webdriver/support/guards.rb +9 -3
- data/lib/selenium/webdriver/version.rb +1 -1
- metadata +6 -3
|
Binary file
|
|
@@ -17,20 +17,28 @@
|
|
|
17
17
|
# specific language governing permissions and limitations
|
|
18
18
|
# under the License.
|
|
19
19
|
|
|
20
|
+
require 'selenium/webdriver/common/error'
|
|
21
|
+
require 'selenium/webdriver/bidi/protocol/error_code'
|
|
22
|
+
|
|
20
23
|
module Selenium
|
|
21
24
|
module WebDriver
|
|
22
|
-
module
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
#
|
|
25
|
+
module Error
|
|
26
|
+
# Register each BiDi-only code as a WebDriverError subclass; shared codes keep their classic class.
|
|
27
|
+
BiDi::Protocol::ErrorCode::CLASS_NAMES.each_value do |name|
|
|
28
|
+
const_set(name, Class.new(WebDriverError)) unless const_defined?(name, false)
|
|
29
|
+
end
|
|
30
|
+
end
|
|
29
31
|
|
|
30
|
-
|
|
31
|
-
|
|
32
|
+
class BiDi
|
|
33
|
+
module Protocol
|
|
34
|
+
module ErrorCode
|
|
35
|
+
# The exception class for a wire error code, or WebDriverError for an unknown one.
|
|
36
|
+
def self.for(code)
|
|
37
|
+
name = code && CLASS_NAMES[code]
|
|
38
|
+
name ? Error.const_get(name) : Error::WebDriverError
|
|
39
|
+
end
|
|
32
40
|
end
|
|
33
|
-
end
|
|
34
|
-
end
|
|
35
|
-
end
|
|
36
|
-
end
|
|
41
|
+
end
|
|
42
|
+
end
|
|
43
|
+
end
|
|
44
|
+
end
|
|
@@ -17,8 +17,8 @@
|
|
|
17
17
|
# specific language governing permissions and limitations
|
|
18
18
|
# under the License.
|
|
19
19
|
|
|
20
|
-
# This file is
|
|
21
|
-
# Regenerate with: bazel run //rb/lib/selenium/webdriver:bidi-generate
|
|
20
|
+
# DO NOT EDIT! This file is generated by rb/lib/selenium/webdriver/bidi/support/bidi_generate.rb.
|
|
21
|
+
# Regenerate with: `bazel run //rb/lib/selenium/webdriver:bidi-generate`
|
|
22
22
|
|
|
23
23
|
module Selenium
|
|
24
24
|
module WebDriver
|
|
@@ -80,6 +80,7 @@ module Selenium
|
|
|
80
80
|
|
|
81
81
|
# @api private
|
|
82
82
|
# @see https://www.selenium.dev/documentation/warnings/bidi-implementation/
|
|
83
|
+
# @see https://webbluetoothcg.github.io/web-bluetooth/#cddl-type-bluetoothbluetoothmanufacturerdata
|
|
83
84
|
BluetoothManufacturerData = Serialization::Record.define(
|
|
84
85
|
key: {wire_key: 'key', primitive: 'integer'},
|
|
85
86
|
data: {wire_key: 'data', primitive: 'string'}
|
|
@@ -87,6 +88,7 @@ module Selenium
|
|
|
87
88
|
|
|
88
89
|
# @api private
|
|
89
90
|
# @see https://www.selenium.dev/documentation/warnings/bidi-implementation/
|
|
91
|
+
# @see https://webbluetoothcg.github.io/web-bluetooth/#cddl-type-bluetoothcharacteristicproperties
|
|
90
92
|
CharacteristicProperties = Serialization::Record.define(
|
|
91
93
|
broadcast: {wire_key: 'broadcast', required: false, primitive: 'boolean'},
|
|
92
94
|
read: {wire_key: 'read', required: false, primitive: 'boolean'},
|
|
@@ -100,13 +102,15 @@ module Selenium
|
|
|
100
102
|
|
|
101
103
|
# @api private
|
|
102
104
|
# @see https://www.selenium.dev/documentation/warnings/bidi-implementation/
|
|
105
|
+
# @see https://webbluetoothcg.github.io/web-bluetooth/#cddl-type-bluetoothrequestdeviceinfo
|
|
103
106
|
RequestDeviceInfo = Serialization::Record.define(
|
|
104
|
-
id: 'id',
|
|
107
|
+
id: {wire_key: 'id', primitive: 'string'},
|
|
105
108
|
name: {wire_key: 'name', nullable: true, primitive: 'string'}
|
|
106
109
|
)
|
|
107
110
|
|
|
108
111
|
# @api private
|
|
109
112
|
# @see https://www.selenium.dev/documentation/warnings/bidi-implementation/
|
|
113
|
+
# @see https://webbluetoothcg.github.io/web-bluetooth/#cddl-type-bluetoothscanrecord
|
|
110
114
|
ScanRecord = Serialization::Record.define(
|
|
111
115
|
name: {wire_key: 'name', required: false, primitive: 'string'},
|
|
112
116
|
uuids: {wire_key: 'uuids', required: false, list: true},
|
|
@@ -121,20 +125,22 @@ module Selenium
|
|
|
121
125
|
|
|
122
126
|
# @api private
|
|
123
127
|
# @see https://www.selenium.dev/documentation/warnings/bidi-implementation/
|
|
128
|
+
# @see https://webbluetoothcg.github.io/web-bluetooth/#cddl-type-bluetoothhandlerequestdevicepromptparameters
|
|
124
129
|
class HandleRequestDevicePromptParameters < Serialization::Union
|
|
125
130
|
discriminator 'accept'
|
|
126
131
|
variants(
|
|
127
132
|
true => 'Bluetooth::HandleRequestDevicePromptParameters::AcceptParameters',
|
|
128
133
|
false => 'Bluetooth::HandleRequestDevicePromptParameters::CancelParameters'
|
|
129
134
|
)
|
|
135
|
+
object_only
|
|
130
136
|
|
|
131
137
|
# @api private
|
|
132
138
|
# @see https://www.selenium.dev/documentation/warnings/bidi-implementation/
|
|
133
139
|
AcceptParameters = Serialization::Record.define(
|
|
134
140
|
accept: {fixed: true},
|
|
135
141
|
context: {wire_key: 'context', primitive: 'string'},
|
|
136
|
-
prompt: 'prompt',
|
|
137
|
-
device: 'device'
|
|
142
|
+
prompt: {wire_key: 'prompt', primitive: 'string'},
|
|
143
|
+
device: {wire_key: 'device', primitive: 'string'}
|
|
138
144
|
)
|
|
139
145
|
|
|
140
146
|
# @api private
|
|
@@ -142,12 +148,16 @@ module Selenium
|
|
|
142
148
|
CancelParameters = Serialization::Record.define(
|
|
143
149
|
accept: {fixed: false},
|
|
144
150
|
context: {wire_key: 'context', primitive: 'string'},
|
|
145
|
-
prompt: 'prompt'
|
|
151
|
+
prompt: {wire_key: 'prompt', primitive: 'string'}
|
|
146
152
|
)
|
|
153
|
+
|
|
154
|
+
def self.true(**) = Bluetooth::HandleRequestDevicePromptParameters::AcceptParameters.new(**)
|
|
155
|
+
def self.false(**) = Bluetooth::HandleRequestDevicePromptParameters::CancelParameters.new(**)
|
|
147
156
|
end
|
|
148
157
|
|
|
149
158
|
# @api private
|
|
150
159
|
# @see https://www.selenium.dev/documentation/warnings/bidi-implementation/
|
|
160
|
+
# @see https://webbluetoothcg.github.io/web-bluetooth/#cddl-type-bluetoothsimulateadapterparameters
|
|
151
161
|
SimulateAdapterParameters = Serialization::Record.define(
|
|
152
162
|
context: {wire_key: 'context', primitive: 'string'},
|
|
153
163
|
le_supported: {wire_key: 'leSupported', required: false, primitive: 'boolean'},
|
|
@@ -156,12 +166,14 @@ module Selenium
|
|
|
156
166
|
|
|
157
167
|
# @api private
|
|
158
168
|
# @see https://www.selenium.dev/documentation/warnings/bidi-implementation/
|
|
169
|
+
# @see https://webbluetoothcg.github.io/web-bluetooth/#cddl-type-bluetoothdisablesimulationparameters
|
|
159
170
|
DisableSimulationParameters = Serialization::Record.define(
|
|
160
171
|
context: {wire_key: 'context', primitive: 'string'}
|
|
161
172
|
)
|
|
162
173
|
|
|
163
174
|
# @api private
|
|
164
175
|
# @see https://www.selenium.dev/documentation/warnings/bidi-implementation/
|
|
176
|
+
# @see https://webbluetoothcg.github.io/web-bluetooth/#cddl-type-bluetoothsimulatepreconnectedperipheralparameters
|
|
165
177
|
SimulatePreconnectedPeripheralParameters = Serialization::Record.define(
|
|
166
178
|
context: {wire_key: 'context', primitive: 'string'},
|
|
167
179
|
address: {wire_key: 'address', primitive: 'string'},
|
|
@@ -172,6 +184,7 @@ module Selenium
|
|
|
172
184
|
|
|
173
185
|
# @api private
|
|
174
186
|
# @see https://www.selenium.dev/documentation/warnings/bidi-implementation/
|
|
187
|
+
# @see https://webbluetoothcg.github.io/web-bluetooth/#cddl-type-bluetoothsimulateadvertisementparameters
|
|
175
188
|
SimulateAdvertisementParameters = Serialization::Record.define(
|
|
176
189
|
context: {wire_key: 'context', primitive: 'string'},
|
|
177
190
|
scan_entry: {wire_key: 'scanEntry', ref: 'Bluetooth::SimulateAdvertisementScanEntryParameters'}
|
|
@@ -179,6 +192,7 @@ module Selenium
|
|
|
179
192
|
|
|
180
193
|
# @api private
|
|
181
194
|
# @see https://www.selenium.dev/documentation/warnings/bidi-implementation/
|
|
195
|
+
# @see https://webbluetoothcg.github.io/web-bluetooth/#cddl-type-bluetoothsimulateadvertisementscanentryparameters
|
|
182
196
|
SimulateAdvertisementScanEntryParameters = Serialization::Record.define(
|
|
183
197
|
device_address: {wire_key: 'deviceAddress', primitive: 'string'},
|
|
184
198
|
rssi: {wire_key: 'rssi', primitive: 'number'},
|
|
@@ -187,6 +201,7 @@ module Selenium
|
|
|
187
201
|
|
|
188
202
|
# @api private
|
|
189
203
|
# @see https://www.selenium.dev/documentation/warnings/bidi-implementation/
|
|
204
|
+
# @see https://webbluetoothcg.github.io/web-bluetooth/#cddl-type-bluetoothsimulategattconnectionresponseparameters
|
|
190
205
|
SimulateGattConnectionResponseParameters = Serialization::Record.define(
|
|
191
206
|
context: {wire_key: 'context', primitive: 'string'},
|
|
192
207
|
address: {wire_key: 'address', primitive: 'string'},
|
|
@@ -195,6 +210,7 @@ module Selenium
|
|
|
195
210
|
|
|
196
211
|
# @api private
|
|
197
212
|
# @see https://www.selenium.dev/documentation/warnings/bidi-implementation/
|
|
213
|
+
# @see https://webbluetoothcg.github.io/web-bluetooth/#cddl-type-bluetoothsimulategattdisconnectionparameters
|
|
198
214
|
SimulateGattDisconnectionParameters = Serialization::Record.define(
|
|
199
215
|
context: {wire_key: 'context', primitive: 'string'},
|
|
200
216
|
address: {wire_key: 'address', primitive: 'string'}
|
|
@@ -202,20 +218,22 @@ module Selenium
|
|
|
202
218
|
|
|
203
219
|
# @api private
|
|
204
220
|
# @see https://www.selenium.dev/documentation/warnings/bidi-implementation/
|
|
221
|
+
# @see https://webbluetoothcg.github.io/web-bluetooth/#cddl-type-bluetoothsimulateserviceparameters
|
|
205
222
|
SimulateServiceParameters = Serialization::Record.define(
|
|
206
223
|
context: {wire_key: 'context', primitive: 'string'},
|
|
207
224
|
address: {wire_key: 'address', primitive: 'string'},
|
|
208
|
-
uuid: 'uuid',
|
|
225
|
+
uuid: {wire_key: 'uuid', primitive: 'string'},
|
|
209
226
|
type: {wire_key: 'type', enum: 'Bluetooth::SIMULATE_SERVICE_PARAMETERS_TYPE'}
|
|
210
227
|
)
|
|
211
228
|
|
|
212
229
|
# @api private
|
|
213
230
|
# @see https://www.selenium.dev/documentation/warnings/bidi-implementation/
|
|
231
|
+
# @see https://webbluetoothcg.github.io/web-bluetooth/#cddl-type-bluetoothsimulatecharacteristicparameters
|
|
214
232
|
SimulateCharacteristicParameters = Serialization::Record.define(
|
|
215
233
|
context: {wire_key: 'context', primitive: 'string'},
|
|
216
234
|
address: {wire_key: 'address', primitive: 'string'},
|
|
217
|
-
service_uuid: 'serviceUuid',
|
|
218
|
-
characteristic_uuid: 'characteristicUuid',
|
|
235
|
+
service_uuid: {wire_key: 'serviceUuid', primitive: 'string'},
|
|
236
|
+
characteristic_uuid: {wire_key: 'characteristicUuid', primitive: 'string'},
|
|
219
237
|
characteristic_properties: {
|
|
220
238
|
wire_key: 'characteristicProperties',
|
|
221
239
|
required: false,
|
|
@@ -226,11 +244,12 @@ module Selenium
|
|
|
226
244
|
|
|
227
245
|
# @api private
|
|
228
246
|
# @see https://www.selenium.dev/documentation/warnings/bidi-implementation/
|
|
247
|
+
# @see https://webbluetoothcg.github.io/web-bluetooth/#cddl-type-bluetoothsimulatecharacteristicresponseparameters
|
|
229
248
|
SimulateCharacteristicResponseParameters = Serialization::Record.define(
|
|
230
249
|
context: {wire_key: 'context', primitive: 'string'},
|
|
231
250
|
address: {wire_key: 'address', primitive: 'string'},
|
|
232
|
-
service_uuid: 'serviceUuid',
|
|
233
|
-
characteristic_uuid: 'characteristicUuid',
|
|
251
|
+
service_uuid: {wire_key: 'serviceUuid', primitive: 'string'},
|
|
252
|
+
characteristic_uuid: {wire_key: 'characteristicUuid', primitive: 'string'},
|
|
234
253
|
type: {wire_key: 'type', enum: 'Bluetooth::SIMULATE_CHARACTERISTIC_RESPONSE_PARAMETERS_TYPE'},
|
|
235
254
|
code: {wire_key: 'code', primitive: 'integer'},
|
|
236
255
|
data: {wire_key: 'data', required: false, list: true}
|
|
@@ -238,23 +257,25 @@ module Selenium
|
|
|
238
257
|
|
|
239
258
|
# @api private
|
|
240
259
|
# @see https://www.selenium.dev/documentation/warnings/bidi-implementation/
|
|
260
|
+
# @see https://webbluetoothcg.github.io/web-bluetooth/#cddl-type-bluetoothsimulatedescriptorparameters
|
|
241
261
|
SimulateDescriptorParameters = Serialization::Record.define(
|
|
242
262
|
context: {wire_key: 'context', primitive: 'string'},
|
|
243
263
|
address: {wire_key: 'address', primitive: 'string'},
|
|
244
|
-
service_uuid: 'serviceUuid',
|
|
245
|
-
characteristic_uuid: 'characteristicUuid',
|
|
246
|
-
descriptor_uuid: 'descriptorUuid',
|
|
264
|
+
service_uuid: {wire_key: 'serviceUuid', primitive: 'string'},
|
|
265
|
+
characteristic_uuid: {wire_key: 'characteristicUuid', primitive: 'string'},
|
|
266
|
+
descriptor_uuid: {wire_key: 'descriptorUuid', primitive: 'string'},
|
|
247
267
|
type: {wire_key: 'type', enum: 'Bluetooth::SIMULATE_DESCRIPTOR_PARAMETERS_TYPE'}
|
|
248
268
|
)
|
|
249
269
|
|
|
250
270
|
# @api private
|
|
251
271
|
# @see https://www.selenium.dev/documentation/warnings/bidi-implementation/
|
|
272
|
+
# @see https://webbluetoothcg.github.io/web-bluetooth/#cddl-type-bluetoothsimulatedescriptorresponseparameters
|
|
252
273
|
SimulateDescriptorResponseParameters = Serialization::Record.define(
|
|
253
274
|
context: {wire_key: 'context', primitive: 'string'},
|
|
254
275
|
address: {wire_key: 'address', primitive: 'string'},
|
|
255
|
-
service_uuid: 'serviceUuid',
|
|
256
|
-
characteristic_uuid: 'characteristicUuid',
|
|
257
|
-
descriptor_uuid: 'descriptorUuid',
|
|
276
|
+
service_uuid: {wire_key: 'serviceUuid', primitive: 'string'},
|
|
277
|
+
characteristic_uuid: {wire_key: 'characteristicUuid', primitive: 'string'},
|
|
278
|
+
descriptor_uuid: {wire_key: 'descriptorUuid', primitive: 'string'},
|
|
258
279
|
type: {wire_key: 'type', enum: 'Bluetooth::SIMULATE_DESCRIPTOR_RESPONSE_PARAMETERS_TYPE'},
|
|
259
280
|
code: {wire_key: 'code', primitive: 'integer'},
|
|
260
281
|
data: {wire_key: 'data', required: false, list: true}
|
|
@@ -262,14 +283,16 @@ module Selenium
|
|
|
262
283
|
|
|
263
284
|
# @api private
|
|
264
285
|
# @see https://www.selenium.dev/documentation/warnings/bidi-implementation/
|
|
286
|
+
# @see https://webbluetoothcg.github.io/web-bluetooth/#cddl-type-bluetoothrequestdevicepromptupdatedparameters
|
|
265
287
|
RequestDevicePromptUpdatedParameters = Serialization::Record.define(
|
|
266
288
|
context: {wire_key: 'context', primitive: 'string'},
|
|
267
|
-
prompt: 'prompt',
|
|
289
|
+
prompt: {wire_key: 'prompt', primitive: 'string'},
|
|
268
290
|
devices: {wire_key: 'devices', ref: 'Bluetooth::RequestDeviceInfo', list: true}
|
|
269
291
|
)
|
|
270
292
|
|
|
271
293
|
# @api private
|
|
272
294
|
# @see https://www.selenium.dev/documentation/warnings/bidi-implementation/
|
|
295
|
+
# @see https://webbluetoothcg.github.io/web-bluetooth/#cddl-type-bluetoothgattconnectionattemptedparameters
|
|
273
296
|
GattConnectionAttemptedParameters = Serialization::Record.define(
|
|
274
297
|
context: {wire_key: 'context', primitive: 'string'},
|
|
275
298
|
address: {wire_key: 'address', primitive: 'string'}
|
|
@@ -277,23 +300,25 @@ module Selenium
|
|
|
277
300
|
|
|
278
301
|
# @api private
|
|
279
302
|
# @see https://www.selenium.dev/documentation/warnings/bidi-implementation/
|
|
303
|
+
# @see https://webbluetoothcg.github.io/web-bluetooth/#cddl-type-bluetoothcharacteristiceventgeneratedparameters
|
|
280
304
|
CharacteristicEventGeneratedParameters = Serialization::Record.define(
|
|
281
305
|
context: {wire_key: 'context', primitive: 'string'},
|
|
282
306
|
address: {wire_key: 'address', primitive: 'string'},
|
|
283
|
-
service_uuid: 'serviceUuid',
|
|
284
|
-
characteristic_uuid: 'characteristicUuid',
|
|
307
|
+
service_uuid: {wire_key: 'serviceUuid', primitive: 'string'},
|
|
308
|
+
characteristic_uuid: {wire_key: 'characteristicUuid', primitive: 'string'},
|
|
285
309
|
type: {wire_key: 'type', enum: 'Bluetooth::CHARACTERISTIC_EVENT_GENERATED_PARAMETERS_TYPE'},
|
|
286
310
|
data: {wire_key: 'data', required: false, list: true}
|
|
287
311
|
)
|
|
288
312
|
|
|
289
313
|
# @api private
|
|
290
314
|
# @see https://www.selenium.dev/documentation/warnings/bidi-implementation/
|
|
315
|
+
# @see https://webbluetoothcg.github.io/web-bluetooth/#cddl-type-bluetoothdescriptoreventgeneratedparameters
|
|
291
316
|
DescriptorEventGeneratedParameters = Serialization::Record.define(
|
|
292
317
|
context: {wire_key: 'context', primitive: 'string'},
|
|
293
318
|
address: {wire_key: 'address', primitive: 'string'},
|
|
294
|
-
service_uuid: 'serviceUuid',
|
|
295
|
-
characteristic_uuid: 'characteristicUuid',
|
|
296
|
-
descriptor_uuid: 'descriptorUuid',
|
|
319
|
+
service_uuid: {wire_key: 'serviceUuid', primitive: 'string'},
|
|
320
|
+
characteristic_uuid: {wire_key: 'characteristicUuid', primitive: 'string'},
|
|
321
|
+
descriptor_uuid: {wire_key: 'descriptorUuid', primitive: 'string'},
|
|
297
322
|
type: {wire_key: 'type', enum: 'Bluetooth::DESCRIPTOR_EVENT_GENERATED_PARAMETERS_TYPE'},
|
|
298
323
|
data: {wire_key: 'data', required: false, list: true}
|
|
299
324
|
)
|
|
@@ -303,6 +328,11 @@ module Selenium
|
|
|
303
328
|
'bluetooth.gattConnectionAttempted' => Bluetooth::GattConnectionAttemptedParameters
|
|
304
329
|
}.freeze
|
|
305
330
|
|
|
331
|
+
def bluetooth_manufacturer_data(**) = BluetoothManufacturerData.new(**)
|
|
332
|
+
def characteristic_properties(**) = CharacteristicProperties.new(**)
|
|
333
|
+
def scan_record(**) = ScanRecord.new(**)
|
|
334
|
+
def simulate_advertisement_scan_entry_parameters(**) = SimulateAdvertisementScanEntryParameters.new(**)
|
|
335
|
+
|
|
306
336
|
# @api private
|
|
307
337
|
# @see https://www.selenium.dev/documentation/warnings/bidi-implementation/
|
|
308
338
|
def handle_request_device_prompt(context:, prompt:, accept:, device: Serialization::UNSET)
|
|
@@ -17,8 +17,8 @@
|
|
|
17
17
|
# specific language governing permissions and limitations
|
|
18
18
|
# under the License.
|
|
19
19
|
|
|
20
|
-
# This file is
|
|
21
|
-
# Regenerate with: bazel run //rb/lib/selenium/webdriver:bidi-generate
|
|
20
|
+
# DO NOT EDIT! This file is generated by rb/lib/selenium/webdriver/bidi/support/bidi_generate.rb.
|
|
21
|
+
# Regenerate with: `bazel run //rb/lib/selenium/webdriver:bidi-generate`
|
|
22
22
|
|
|
23
23
|
module Selenium
|
|
24
24
|
module WebDriver
|
|
@@ -26,6 +26,7 @@ module Selenium
|
|
|
26
26
|
module Protocol
|
|
27
27
|
# @api private
|
|
28
28
|
# @see https://www.selenium.dev/documentation/warnings/bidi-implementation/
|
|
29
|
+
# @see https://w3c.github.io/webdriver-bidi/#module-browser
|
|
29
30
|
class Browser < Domain
|
|
30
31
|
CLIENT_WINDOW_INFO_STATE = {
|
|
31
32
|
fullscreen: 'fullscreen',
|
|
@@ -42,22 +43,25 @@ module Selenium
|
|
|
42
43
|
|
|
43
44
|
# @api private
|
|
44
45
|
# @see https://www.selenium.dev/documentation/warnings/bidi-implementation/
|
|
46
|
+
# @see https://w3c.github.io/webdriver-bidi/#type-browser-ClientWindowInfo
|
|
45
47
|
ClientWindowInfo = Serialization::Record.define(
|
|
46
48
|
active: {wire_key: 'active', primitive: 'boolean'},
|
|
47
|
-
client_window: 'clientWindow',
|
|
48
|
-
height: 'height',
|
|
49
|
+
client_window: {wire_key: 'clientWindow', primitive: 'string'},
|
|
50
|
+
height: {wire_key: 'height', primitive: 'integer'},
|
|
49
51
|
state: {wire_key: 'state', enum: 'Browser::CLIENT_WINDOW_INFO_STATE'},
|
|
50
|
-
width: 'width',
|
|
51
|
-
x: 'x',
|
|
52
|
-
y: 'y'
|
|
52
|
+
width: {wire_key: 'width', primitive: 'integer'},
|
|
53
|
+
x: {wire_key: 'x', primitive: 'integer'},
|
|
54
|
+
y: {wire_key: 'y', primitive: 'integer'}
|
|
53
55
|
)
|
|
54
56
|
|
|
55
57
|
# @api private
|
|
56
58
|
# @see https://www.selenium.dev/documentation/warnings/bidi-implementation/
|
|
57
|
-
|
|
59
|
+
# @see https://w3c.github.io/webdriver-bidi/#type-browser-UserContextInfo
|
|
60
|
+
UserContextInfo = Serialization::Record.define(user_context: {wire_key: 'userContext', primitive: 'string'})
|
|
58
61
|
|
|
59
62
|
# @api private
|
|
60
63
|
# @see https://www.selenium.dev/documentation/warnings/bidi-implementation/
|
|
64
|
+
# @see https://w3c.github.io/webdriver-bidi/#cddl-type-browsercreateusercontextparameters
|
|
61
65
|
CreateUserContextParameters = Serialization::Record.define(
|
|
62
66
|
accept_insecure_certs: {wire_key: 'acceptInsecureCerts', required: false, primitive: 'boolean'},
|
|
63
67
|
proxy: {wire_key: 'proxy', required: false, ref: 'Session::ProxyConfiguration'},
|
|
@@ -70,33 +74,40 @@ module Selenium
|
|
|
70
74
|
|
|
71
75
|
# @api private
|
|
72
76
|
# @see https://www.selenium.dev/documentation/warnings/bidi-implementation/
|
|
77
|
+
# @see https://w3c.github.io/webdriver-bidi/#cddl-type-browsergetclientwindowsresult
|
|
73
78
|
GetClientWindowsResult = Serialization::Record.define(
|
|
74
79
|
client_windows: {wire_key: 'clientWindows', ref: 'Browser::ClientWindowInfo', list: true}
|
|
75
80
|
)
|
|
76
81
|
|
|
77
82
|
# @api private
|
|
78
83
|
# @see https://www.selenium.dev/documentation/warnings/bidi-implementation/
|
|
84
|
+
# @see https://w3c.github.io/webdriver-bidi/#cddl-type-browsergetusercontextsresult
|
|
79
85
|
GetUserContextsResult = Serialization::Record.define(
|
|
80
86
|
user_contexts: {wire_key: 'userContexts', ref: 'Browser::UserContextInfo', list: true}
|
|
81
87
|
)
|
|
82
88
|
|
|
83
89
|
# @api private
|
|
84
90
|
# @see https://www.selenium.dev/documentation/warnings/bidi-implementation/
|
|
85
|
-
|
|
91
|
+
# @see https://w3c.github.io/webdriver-bidi/#cddl-type-browserremoveusercontextparameters
|
|
92
|
+
RemoveUserContextParameters = Serialization::Record.define(
|
|
93
|
+
user_context: {wire_key: 'userContext', primitive: 'string'}
|
|
94
|
+
)
|
|
86
95
|
|
|
87
96
|
# @api private
|
|
88
97
|
# @see https://www.selenium.dev/documentation/warnings/bidi-implementation/
|
|
98
|
+
# @see https://w3c.github.io/webdriver-bidi/#cddl-type-browsersetclientwindowstateparameters
|
|
89
99
|
class SetClientWindowStateParameters < Serialization::Union
|
|
90
100
|
discriminator 'state', {normal: 'normal'}
|
|
91
101
|
variants(
|
|
92
102
|
normal: 'Browser::SetClientWindowStateParameters::ClientWindowRectState'
|
|
93
103
|
)
|
|
94
104
|
fallback 'Browser::SetClientWindowStateParameters::ClientWindowNamedState'
|
|
105
|
+
object_only
|
|
95
106
|
|
|
96
107
|
# @api private
|
|
97
108
|
# @see https://www.selenium.dev/documentation/warnings/bidi-implementation/
|
|
98
109
|
ClientWindowNamedState = Serialization::Record.define(
|
|
99
|
-
client_window: 'clientWindow',
|
|
110
|
+
client_window: {wire_key: 'clientWindow', primitive: 'string'},
|
|
100
111
|
state: {wire_key: 'state', enum: 'Browser::CLIENT_WINDOW_NAMED_STATE_STATE'}
|
|
101
112
|
)
|
|
102
113
|
|
|
@@ -104,16 +115,19 @@ module Selenium
|
|
|
104
115
|
# @see https://www.selenium.dev/documentation/warnings/bidi-implementation/
|
|
105
116
|
ClientWindowRectState = Serialization::Record.define(
|
|
106
117
|
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}
|
|
118
|
+
client_window: {wire_key: 'clientWindow', primitive: 'string'},
|
|
119
|
+
width: {wire_key: 'width', required: false, primitive: 'integer'},
|
|
120
|
+
height: {wire_key: 'height', required: false, primitive: 'integer'},
|
|
121
|
+
x: {wire_key: 'x', required: false, primitive: 'integer'},
|
|
122
|
+
y: {wire_key: 'y', required: false, primitive: 'integer'}
|
|
112
123
|
)
|
|
124
|
+
|
|
125
|
+
def self.normal(**) = Browser::SetClientWindowStateParameters::ClientWindowRectState.new(**)
|
|
113
126
|
end
|
|
114
127
|
|
|
115
128
|
# @api private
|
|
116
129
|
# @see https://www.selenium.dev/documentation/warnings/bidi-implementation/
|
|
130
|
+
# @see https://w3c.github.io/webdriver-bidi/#cddl-type-browsersetdownloadbehaviorparameters
|
|
117
131
|
SetDownloadBehaviorParameters = Serialization::Record.define(
|
|
118
132
|
download_behavior: {wire_key: 'downloadBehavior', nullable: true, ref: 'Browser::DownloadBehavior'},
|
|
119
133
|
user_contexts: {wire_key: 'userContexts', required: false, list: true}
|
|
@@ -121,12 +135,14 @@ module Selenium
|
|
|
121
135
|
|
|
122
136
|
# @api private
|
|
123
137
|
# @see https://www.selenium.dev/documentation/warnings/bidi-implementation/
|
|
138
|
+
# @see https://w3c.github.io/webdriver-bidi/#cddl-type-browserdownloadbehavior
|
|
124
139
|
class DownloadBehavior < Serialization::Union
|
|
125
140
|
discriminator 'type', {allowed: 'allowed', denied: 'denied'}
|
|
126
141
|
variants(
|
|
127
142
|
allowed: 'Browser::DownloadBehavior::Allowed',
|
|
128
143
|
denied: 'Browser::DownloadBehavior::Denied'
|
|
129
144
|
)
|
|
145
|
+
object_only
|
|
130
146
|
|
|
131
147
|
# @api private
|
|
132
148
|
# @see https://www.selenium.dev/documentation/warnings/bidi-implementation/
|
|
@@ -138,16 +154,23 @@ module Selenium
|
|
|
138
154
|
# @api private
|
|
139
155
|
# @see https://www.selenium.dev/documentation/warnings/bidi-implementation/
|
|
140
156
|
Denied = Serialization::Record.define(type: {fixed: 'denied'})
|
|
157
|
+
|
|
158
|
+
def self.allowed(**) = Browser::DownloadBehavior::Allowed.new(**)
|
|
159
|
+
def self.denied(**) = Browser::DownloadBehavior::Denied.new(**)
|
|
141
160
|
end
|
|
142
161
|
|
|
162
|
+
def download_behavior = DownloadBehavior
|
|
163
|
+
|
|
143
164
|
# @api private
|
|
144
165
|
# @see https://www.selenium.dev/documentation/warnings/bidi-implementation/
|
|
166
|
+
# @see https://w3c.github.io/webdriver-bidi/#command-browser-close
|
|
145
167
|
def close
|
|
146
168
|
execute(cmd: 'browser.close')
|
|
147
169
|
end
|
|
148
170
|
|
|
149
171
|
# @api private
|
|
150
172
|
# @see https://www.selenium.dev/documentation/warnings/bidi-implementation/
|
|
173
|
+
# @see https://w3c.github.io/webdriver-bidi/#command-browser-createUserContext
|
|
151
174
|
def create_user_context(
|
|
152
175
|
accept_insecure_certs: Serialization::UNSET,
|
|
153
176
|
proxy: Serialization::UNSET,
|
|
@@ -163,18 +186,21 @@ module Selenium
|
|
|
163
186
|
|
|
164
187
|
# @api private
|
|
165
188
|
# @see https://www.selenium.dev/documentation/warnings/bidi-implementation/
|
|
189
|
+
# @see https://w3c.github.io/webdriver-bidi/#command-browser-getClientWindows
|
|
166
190
|
def get_client_windows
|
|
167
191
|
execute(cmd: 'browser.getClientWindows', result: Browser::GetClientWindowsResult)
|
|
168
192
|
end
|
|
169
193
|
|
|
170
194
|
# @api private
|
|
171
195
|
# @see https://www.selenium.dev/documentation/warnings/bidi-implementation/
|
|
196
|
+
# @see https://w3c.github.io/webdriver-bidi/#command-browser-getUserContexts
|
|
172
197
|
def get_user_contexts
|
|
173
198
|
execute(cmd: 'browser.getUserContexts', result: Browser::GetUserContextsResult)
|
|
174
199
|
end
|
|
175
200
|
|
|
176
201
|
# @api private
|
|
177
202
|
# @see https://www.selenium.dev/documentation/warnings/bidi-implementation/
|
|
203
|
+
# @see https://w3c.github.io/webdriver-bidi/#command-browser-removeUserContext
|
|
178
204
|
def remove_user_context(user_context:)
|
|
179
205
|
params = RemoveUserContextParameters.new(user_context: user_context)
|
|
180
206
|
execute(cmd: 'browser.removeUserContext', params: params)
|
|
@@ -182,6 +208,7 @@ module Selenium
|
|
|
182
208
|
|
|
183
209
|
# @api private
|
|
184
210
|
# @see https://www.selenium.dev/documentation/warnings/bidi-implementation/
|
|
211
|
+
# @see https://w3c.github.io/webdriver-bidi/#command-browser-setClientWindowState
|
|
185
212
|
def set_client_window_state(
|
|
186
213
|
client_window:,
|
|
187
214
|
state:,
|
|
@@ -208,6 +235,7 @@ module Selenium
|
|
|
208
235
|
|
|
209
236
|
# @api private
|
|
210
237
|
# @see https://www.selenium.dev/documentation/warnings/bidi-implementation/
|
|
238
|
+
# @see https://w3c.github.io/webdriver-bidi/#command-browser-setDownloadBehavior
|
|
211
239
|
def set_download_behavior(download_behavior:, user_contexts: Serialization::UNSET)
|
|
212
240
|
params = SetDownloadBehaviorParameters.new(
|
|
213
241
|
download_behavior: download_behavior,
|