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,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
|