selenium-devtools 0.94.0 → 0.98.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/LICENSE +1 -1
- data/NOTICE +1 -1
- data/lib/selenium/devtools/README.md +14 -0
- data/lib/selenium/devtools/{v94 → v96}/accessibility.rb +4 -3
- data/lib/selenium/devtools/{v94 → v96}/animation.rb +2 -2
- data/lib/selenium/devtools/{v93 → v96}/audits.rb +2 -2
- data/lib/selenium/devtools/{v93 → v96}/background_service.rb +2 -2
- data/lib/selenium/devtools/{v93 → v96}/browser.rb +2 -2
- data/lib/selenium/devtools/{v94 → v96}/cache_storage.rb +2 -2
- data/lib/selenium/devtools/{v94 → v96}/cast.rb +2 -2
- data/lib/selenium/devtools/{v94 → v96}/console.rb +2 -2
- data/lib/selenium/devtools/{v94 → v96}/css.rb +2 -2
- data/lib/selenium/devtools/{v93 → v96}/database.rb +2 -2
- data/lib/selenium/devtools/{v94 → v96}/debugger.rb +2 -2
- data/lib/selenium/devtools/{v94 → v96}/device_orientation.rb +2 -2
- data/lib/selenium/devtools/{v94 → v96}/dom.rb +2 -2
- data/lib/selenium/devtools/{v93 → v96}/dom_debugger.rb +2 -2
- data/lib/selenium/devtools/{v94 → v96}/dom_snapshot.rb +2 -2
- data/lib/selenium/devtools/{v93 → v96}/dom_storage.rb +2 -2
- data/lib/selenium/devtools/{v94 → v96}/emulation.rb +7 -2
- data/lib/selenium/devtools/{v94 → v96}/fetch.rb +11 -2
- data/lib/selenium/devtools/{v94 → v96}/headless_experimental.rb +2 -2
- data/lib/selenium/devtools/{v93 → v96}/heap_profiler.rb +2 -2
- data/lib/selenium/devtools/{v93 → v96}/indexed_db.rb +2 -2
- data/lib/selenium/devtools/{v94 → v96}/input.rb +2 -2
- data/lib/selenium/devtools/{v93 → v96}/inspector.rb +2 -2
- data/lib/selenium/devtools/{v93 → v96}/io.rb +2 -2
- data/lib/selenium/devtools/{v93 → v96}/layer_tree.rb +2 -2
- data/lib/selenium/devtools/{v94 → v96}/log.rb +2 -2
- data/lib/selenium/devtools/{v94 → v96}/media.rb +2 -2
- data/lib/selenium/devtools/{v93 → v96}/memory.rb +2 -2
- data/lib/selenium/devtools/{v94 → v96}/network.rb +9 -2
- data/lib/selenium/devtools/{v93 → v96}/overlay.rb +7 -2
- data/lib/selenium/devtools/{v94 → v96}/page.rb +6 -2
- data/lib/selenium/devtools/{v93 → v96}/performance.rb +2 -2
- data/lib/selenium/devtools/{v94 → v96}/performance_timeline.rb +2 -2
- data/lib/selenium/devtools/{v93 → v96}/profiler.rb +2 -26
- data/lib/selenium/devtools/{v94 → v96}/runtime.rb +5 -4
- data/lib/selenium/devtools/{v94 → v96}/schema.rb +2 -2
- data/lib/selenium/devtools/{v93 → v96}/security.rb +2 -2
- data/lib/selenium/devtools/{v93 → v96}/service_worker.rb +2 -2
- data/lib/selenium/devtools/{v93 → v96}/storage.rb +2 -2
- data/lib/selenium/devtools/{v93 → v96}/system_info.rb +2 -2
- data/lib/selenium/devtools/{v93 → v96}/target.rb +8 -2
- data/lib/selenium/devtools/{v93 → v96}/tethering.rb +2 -2
- data/lib/selenium/devtools/{v93 → v96}/tracing.rb +2 -2
- data/lib/selenium/devtools/{v93 → v96}/web_audio.rb +2 -2
- data/lib/selenium/devtools/{v93 → v96}/web_authn.rb +2 -2
- data/lib/selenium/devtools/v96.rb +1 -0
- data/lib/selenium/devtools/{v93 → v97}/accessibility.rb +9 -6
- data/lib/selenium/devtools/{v93 → v97}/animation.rb +2 -2
- data/lib/selenium/devtools/{v94 → v97}/audits.rb +2 -2
- data/lib/selenium/devtools/{v94 → v97}/background_service.rb +2 -2
- data/lib/selenium/devtools/{v94 → v97}/browser.rb +2 -2
- data/lib/selenium/devtools/{v93 → v97}/cache_storage.rb +2 -2
- data/lib/selenium/devtools/{v93 → v97}/cast.rb +2 -2
- data/lib/selenium/devtools/{v93 → v97}/console.rb +2 -2
- data/lib/selenium/devtools/{v93 → v97}/css.rb +2 -2
- data/lib/selenium/devtools/{v94 → v97}/database.rb +2 -2
- data/lib/selenium/devtools/{v93 → v97}/debugger.rb +2 -2
- data/lib/selenium/devtools/{v93 → v97}/device_orientation.rb +2 -2
- data/lib/selenium/devtools/{v93 → v97}/dom.rb +7 -2
- data/lib/selenium/devtools/{v94 → v97}/dom_debugger.rb +2 -2
- data/lib/selenium/devtools/{v93 → v97}/dom_snapshot.rb +2 -2
- data/lib/selenium/devtools/{v94 → v97}/dom_storage.rb +2 -2
- data/lib/selenium/devtools/{v93 → v97}/emulation.rb +7 -2
- data/lib/selenium/devtools/v97/event_breakpoints.rb +48 -0
- data/lib/selenium/devtools/{v93 → v97}/fetch.rb +14 -4
- data/lib/selenium/devtools/{v93 → v97}/headless_experimental.rb +2 -2
- data/lib/selenium/devtools/{v94 → v97}/heap_profiler.rb +2 -2
- data/lib/selenium/devtools/{v94 → v97}/indexed_db.rb +2 -2
- data/lib/selenium/devtools/{v93 → v97}/input.rb +11 -2
- data/lib/selenium/devtools/{v94 → v97}/inspector.rb +2 -2
- data/lib/selenium/devtools/{v94 → v97}/io.rb +2 -2
- data/lib/selenium/devtools/{v94 → v97}/layer_tree.rb +2 -2
- data/lib/selenium/devtools/{v93 → v97}/log.rb +2 -2
- data/lib/selenium/devtools/{v93 → v97}/media.rb +2 -2
- data/lib/selenium/devtools/{v94 → v97}/memory.rb +2 -2
- data/lib/selenium/devtools/{v93 → v97}/network.rb +10 -3
- data/lib/selenium/devtools/{v94 → v97}/overlay.rb +7 -2
- data/lib/selenium/devtools/{v93 → v97}/page.rb +16 -7
- data/lib/selenium/devtools/{v94 → v97}/performance.rb +2 -2
- data/lib/selenium/devtools/{v93 → v97}/performance_timeline.rb +2 -2
- data/lib/selenium/devtools/{v94 → v97}/profiler.rb +2 -26
- data/lib/selenium/devtools/{v93 → v97}/runtime.rb +5 -4
- data/lib/selenium/devtools/{v93 → v97}/schema.rb +2 -2
- data/lib/selenium/devtools/{v94 → v97}/security.rb +2 -2
- data/lib/selenium/devtools/{v94 → v97}/service_worker.rb +2 -2
- data/lib/selenium/devtools/{v94 → v97}/storage.rb +2 -2
- data/lib/selenium/devtools/{v94 → v97}/system_info.rb +2 -2
- data/lib/selenium/devtools/{v94 → v97}/target.rb +8 -2
- data/lib/selenium/devtools/{v94 → v97}/tethering.rb +2 -2
- data/lib/selenium/devtools/{v94 → v97}/tracing.rb +2 -2
- data/lib/selenium/devtools/{v94 → v97}/web_audio.rb +2 -2
- data/lib/selenium/devtools/{v94 → v97}/web_authn.rb +2 -2
- data/lib/selenium/devtools/v97.rb +1 -0
- data/lib/selenium/devtools/v98/accessibility.rb +92 -0
- data/lib/selenium/devtools/v98/animation.rb +94 -0
- data/lib/selenium/devtools/v98/audits.rb +62 -0
- data/lib/selenium/devtools/v98/background_service.rb +63 -0
- data/lib/selenium/devtools/v98/browser.rb +135 -0
- data/lib/selenium/devtools/v98/cache_storage.rb +69 -0
- data/lib/selenium/devtools/v98/cast.rb +71 -0
- data/lib/selenium/devtools/v98/console.rb +53 -0
- data/lib/selenium/devtools/v98/css.rb +182 -0
- data/lib/selenium/devtools/v98/database.rb +60 -0
- data/lib/selenium/devtools/v98/debugger.rb +220 -0
- data/lib/selenium/devtools/v98/device_orientation.rb +49 -0
- data/lib/selenium/devtools/v98/dom.rb +334 -0
- data/lib/selenium/devtools/v98/dom_debugger.rb +94 -0
- data/lib/selenium/devtools/v98/dom_snapshot.rb +63 -0
- data/lib/selenium/devtools/v98/dom_storage.rb +75 -0
- data/lib/selenium/devtools/v98/emulation.rb +197 -0
- data/lib/selenium/devtools/v98/event_breakpoints.rb +48 -0
- data/lib/selenium/devtools/v98/fetch.rb +103 -0
- data/lib/selenium/devtools/v98/headless_experimental.rb +57 -0
- data/lib/selenium/devtools/v98/heap_profiler.rb +105 -0
- data/lib/selenium/devtools/v98/indexed_db.rb +96 -0
- data/lib/selenium/devtools/v98/input.rb +168 -0
- data/lib/selenium/devtools/v98/inspector.rb +51 -0
- data/lib/selenium/devtools/v98/io.rb +55 -0
- data/lib/selenium/devtools/v98/layer_tree.rb +91 -0
- data/lib/selenium/devtools/v98/log.rb +62 -0
- data/lib/selenium/devtools/v98/media.rb +53 -0
- data/lib/selenium/devtools/v98/memory.rb +82 -0
- data/lib/selenium/devtools/v98/network.rb +264 -0
- data/lib/selenium/devtools/v98/overlay.rb +202 -0
- data/lib/selenium/devtools/v98/page.rb +393 -0
- data/lib/selenium/devtools/v98/performance.rb +59 -0
- data/lib/selenium/devtools/v98/performance_timeline.rb +46 -0
- data/lib/selenium/devtools/v98/profiler.rb +95 -0
- data/lib/selenium/devtools/v98/runtime.rb +194 -0
- data/lib/selenium/devtools/v98/schema.rb +42 -0
- data/lib/selenium/devtools/v98/security.rb +67 -0
- data/lib/selenium/devtools/v98/service_worker.rb +112 -0
- data/lib/selenium/devtools/v98/storage.rb +106 -0
- data/lib/selenium/devtools/v98/system_info.rb +46 -0
- data/lib/selenium/devtools/v98/target.rb +146 -0
- data/lib/selenium/devtools/v98/tethering.rb +51 -0
- data/lib/selenium/devtools/v98/tracing.rb +75 -0
- data/lib/selenium/devtools/v98/web_audio.rb +66 -0
- data/lib/selenium/devtools/v98/web_authn.rb +96 -0
- data/lib/selenium/devtools/v98.rb +1 -0
- data/lib/selenium/devtools/version.rb +1 -1
- data/selenium-devtools.gemspec +1 -1
- metadata +144 -97
- data/lib/selenium/devtools/v93/application_cache.rb +0 -60
- data/lib/selenium/devtools/v93.rb +0 -1
- data/lib/selenium/devtools/v94/application_cache.rb +0 -60
- data/lib/selenium/devtools/v94.rb +0 -1
@@ -0,0 +1,393 @@
|
|
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. Any changes will be lost!
|
21
|
+
module Selenium
|
22
|
+
module DevTools
|
23
|
+
module V98
|
24
|
+
class Page
|
25
|
+
EVENTS = {
|
26
|
+
dom_content_event_fired: 'domContentEventFired',
|
27
|
+
file_chooser_opened: 'fileChooserOpened',
|
28
|
+
frame_attached: 'frameAttached',
|
29
|
+
frame_cleared_scheduled_navigation: 'frameClearedScheduledNavigation',
|
30
|
+
frame_detached: 'frameDetached',
|
31
|
+
frame_navigated: 'frameNavigated',
|
32
|
+
document_opened: 'documentOpened',
|
33
|
+
frame_resized: 'frameResized',
|
34
|
+
frame_requested_navigation: 'frameRequestedNavigation',
|
35
|
+
frame_scheduled_navigation: 'frameScheduledNavigation',
|
36
|
+
frame_started_loading: 'frameStartedLoading',
|
37
|
+
frame_stopped_loading: 'frameStoppedLoading',
|
38
|
+
download_will_begin: 'downloadWillBegin',
|
39
|
+
download_progress: 'downloadProgress',
|
40
|
+
interstitial_hidden: 'interstitialHidden',
|
41
|
+
interstitial_shown: 'interstitialShown',
|
42
|
+
javascript_dialog_closed: 'javascriptDialogClosed',
|
43
|
+
javascript_dialog_opening: 'javascriptDialogOpening',
|
44
|
+
lifecycle_event: 'lifecycleEvent',
|
45
|
+
back_forward_cache_not_used: 'backForwardCacheNotUsed',
|
46
|
+
load_event_fired: 'loadEventFired',
|
47
|
+
navigated_within_document: 'navigatedWithinDocument',
|
48
|
+
screencast_frame: 'screencastFrame',
|
49
|
+
screencast_visibility_changed: 'screencastVisibilityChanged',
|
50
|
+
window_open: 'windowOpen',
|
51
|
+
compilation_cache_produced: 'compilationCacheProduced',
|
52
|
+
}.freeze
|
53
|
+
|
54
|
+
def initialize(devtools)
|
55
|
+
@devtools = devtools
|
56
|
+
end
|
57
|
+
|
58
|
+
def on(event, &block)
|
59
|
+
event = EVENTS[event] if event.is_a?(Symbol)
|
60
|
+
@devtools.callbacks["Page.#{event}"] << block
|
61
|
+
end
|
62
|
+
|
63
|
+
def add_script_to_evaluate_on_load(script_source:)
|
64
|
+
@devtools.send_cmd('Page.addScriptToEvaluateOnLoad',
|
65
|
+
scriptSource: script_source)
|
66
|
+
end
|
67
|
+
|
68
|
+
def add_script_to_evaluate_on_new_document(source:, world_name: nil, include_command_line_api: nil)
|
69
|
+
@devtools.send_cmd('Page.addScriptToEvaluateOnNewDocument',
|
70
|
+
source: source,
|
71
|
+
worldName: world_name,
|
72
|
+
includeCommandLineAPI: include_command_line_api)
|
73
|
+
end
|
74
|
+
|
75
|
+
def bring_to_front
|
76
|
+
@devtools.send_cmd('Page.bringToFront')
|
77
|
+
end
|
78
|
+
|
79
|
+
def capture_screenshot(format: nil, quality: nil, clip: nil, from_surface: nil, capture_beyond_viewport: nil)
|
80
|
+
@devtools.send_cmd('Page.captureScreenshot',
|
81
|
+
format: format,
|
82
|
+
quality: quality,
|
83
|
+
clip: clip,
|
84
|
+
fromSurface: from_surface,
|
85
|
+
captureBeyondViewport: capture_beyond_viewport)
|
86
|
+
end
|
87
|
+
|
88
|
+
def capture_snapshot(format: nil)
|
89
|
+
@devtools.send_cmd('Page.captureSnapshot',
|
90
|
+
format: format)
|
91
|
+
end
|
92
|
+
|
93
|
+
def clear_device_metrics_override
|
94
|
+
@devtools.send_cmd('Page.clearDeviceMetricsOverride')
|
95
|
+
end
|
96
|
+
|
97
|
+
def clear_device_orientation_override
|
98
|
+
@devtools.send_cmd('Page.clearDeviceOrientationOverride')
|
99
|
+
end
|
100
|
+
|
101
|
+
def clear_geolocation_override
|
102
|
+
@devtools.send_cmd('Page.clearGeolocationOverride')
|
103
|
+
end
|
104
|
+
|
105
|
+
def create_isolated_world(frame_id:, world_name: nil, grant_univeral_access: nil)
|
106
|
+
@devtools.send_cmd('Page.createIsolatedWorld',
|
107
|
+
frameId: frame_id,
|
108
|
+
worldName: world_name,
|
109
|
+
grantUniveralAccess: grant_univeral_access)
|
110
|
+
end
|
111
|
+
|
112
|
+
def delete_cookie(cookie_name:, url:)
|
113
|
+
@devtools.send_cmd('Page.deleteCookie',
|
114
|
+
cookieName: cookie_name,
|
115
|
+
url: url)
|
116
|
+
end
|
117
|
+
|
118
|
+
def disable
|
119
|
+
@devtools.send_cmd('Page.disable')
|
120
|
+
end
|
121
|
+
|
122
|
+
def enable
|
123
|
+
@devtools.send_cmd('Page.enable')
|
124
|
+
end
|
125
|
+
|
126
|
+
def get_app_manifest
|
127
|
+
@devtools.send_cmd('Page.getAppManifest')
|
128
|
+
end
|
129
|
+
|
130
|
+
def get_installability_errors
|
131
|
+
@devtools.send_cmd('Page.getInstallabilityErrors')
|
132
|
+
end
|
133
|
+
|
134
|
+
def get_manifest_icons
|
135
|
+
@devtools.send_cmd('Page.getManifestIcons')
|
136
|
+
end
|
137
|
+
|
138
|
+
def get_app_id
|
139
|
+
@devtools.send_cmd('Page.getAppId')
|
140
|
+
end
|
141
|
+
|
142
|
+
def get_cookies
|
143
|
+
@devtools.send_cmd('Page.getCookies')
|
144
|
+
end
|
145
|
+
|
146
|
+
def get_frame_tree
|
147
|
+
@devtools.send_cmd('Page.getFrameTree')
|
148
|
+
end
|
149
|
+
|
150
|
+
def get_layout_metrics
|
151
|
+
@devtools.send_cmd('Page.getLayoutMetrics')
|
152
|
+
end
|
153
|
+
|
154
|
+
def get_navigation_history
|
155
|
+
@devtools.send_cmd('Page.getNavigationHistory')
|
156
|
+
end
|
157
|
+
|
158
|
+
def reset_navigation_history
|
159
|
+
@devtools.send_cmd('Page.resetNavigationHistory')
|
160
|
+
end
|
161
|
+
|
162
|
+
def get_resource_content(frame_id:, url:)
|
163
|
+
@devtools.send_cmd('Page.getResourceContent',
|
164
|
+
frameId: frame_id,
|
165
|
+
url: url)
|
166
|
+
end
|
167
|
+
|
168
|
+
def get_resource_tree
|
169
|
+
@devtools.send_cmd('Page.getResourceTree')
|
170
|
+
end
|
171
|
+
|
172
|
+
def handle_javascript_dialog(accept:, prompt_text: nil)
|
173
|
+
@devtools.send_cmd('Page.handleJavaScriptDialog',
|
174
|
+
accept: accept,
|
175
|
+
promptText: prompt_text)
|
176
|
+
end
|
177
|
+
|
178
|
+
def navigate(url:, referrer: nil, transition_type: nil, frame_id: nil, referrer_policy: nil)
|
179
|
+
@devtools.send_cmd('Page.navigate',
|
180
|
+
url: url,
|
181
|
+
referrer: referrer,
|
182
|
+
transitionType: transition_type,
|
183
|
+
frameId: frame_id,
|
184
|
+
referrerPolicy: referrer_policy)
|
185
|
+
end
|
186
|
+
|
187
|
+
def navigate_to_history_entry(entry_id:)
|
188
|
+
@devtools.send_cmd('Page.navigateToHistoryEntry',
|
189
|
+
entryId: entry_id)
|
190
|
+
end
|
191
|
+
|
192
|
+
def print_to_pdf(landscape: nil, display_header_footer: nil, print_background: nil, scale: nil, paper_width: nil, paper_height: nil, margin_top: nil, margin_bottom: nil, margin_left: nil, margin_right: nil, page_ranges: nil, ignore_invalid_page_ranges: nil, header_template: nil, footer_template: nil, prefer_css_page_size: nil, transfer_mode: nil)
|
193
|
+
@devtools.send_cmd('Page.printToPDF',
|
194
|
+
landscape: landscape,
|
195
|
+
displayHeaderFooter: display_header_footer,
|
196
|
+
printBackground: print_background,
|
197
|
+
scale: scale,
|
198
|
+
paperWidth: paper_width,
|
199
|
+
paperHeight: paper_height,
|
200
|
+
marginTop: margin_top,
|
201
|
+
marginBottom: margin_bottom,
|
202
|
+
marginLeft: margin_left,
|
203
|
+
marginRight: margin_right,
|
204
|
+
pageRanges: page_ranges,
|
205
|
+
ignoreInvalidPageRanges: ignore_invalid_page_ranges,
|
206
|
+
headerTemplate: header_template,
|
207
|
+
footerTemplate: footer_template,
|
208
|
+
preferCSSPageSize: prefer_css_page_size,
|
209
|
+
transferMode: transfer_mode)
|
210
|
+
end
|
211
|
+
|
212
|
+
def reload(ignore_cache: nil, script_to_evaluate_on_load: nil)
|
213
|
+
@devtools.send_cmd('Page.reload',
|
214
|
+
ignoreCache: ignore_cache,
|
215
|
+
scriptToEvaluateOnLoad: script_to_evaluate_on_load)
|
216
|
+
end
|
217
|
+
|
218
|
+
def remove_script_to_evaluate_on_load(identifier:)
|
219
|
+
@devtools.send_cmd('Page.removeScriptToEvaluateOnLoad',
|
220
|
+
identifier: identifier)
|
221
|
+
end
|
222
|
+
|
223
|
+
def remove_script_to_evaluate_on_new_document(identifier:)
|
224
|
+
@devtools.send_cmd('Page.removeScriptToEvaluateOnNewDocument',
|
225
|
+
identifier: identifier)
|
226
|
+
end
|
227
|
+
|
228
|
+
def screencast_frame_ack(session_id:)
|
229
|
+
@devtools.send_cmd('Page.screencastFrameAck',
|
230
|
+
sessionId: session_id)
|
231
|
+
end
|
232
|
+
|
233
|
+
def search_in_resource(frame_id:, url:, query:, case_sensitive: nil, is_regex: nil)
|
234
|
+
@devtools.send_cmd('Page.searchInResource',
|
235
|
+
frameId: frame_id,
|
236
|
+
url: url,
|
237
|
+
query: query,
|
238
|
+
caseSensitive: case_sensitive,
|
239
|
+
isRegex: is_regex)
|
240
|
+
end
|
241
|
+
|
242
|
+
def set_ad_blocking_enabled(enabled:)
|
243
|
+
@devtools.send_cmd('Page.setAdBlockingEnabled',
|
244
|
+
enabled: enabled)
|
245
|
+
end
|
246
|
+
|
247
|
+
def set_bypass_csp(enabled:)
|
248
|
+
@devtools.send_cmd('Page.setBypassCSP',
|
249
|
+
enabled: enabled)
|
250
|
+
end
|
251
|
+
|
252
|
+
def get_permissions_policy_state(frame_id:)
|
253
|
+
@devtools.send_cmd('Page.getPermissionsPolicyState',
|
254
|
+
frameId: frame_id)
|
255
|
+
end
|
256
|
+
|
257
|
+
def get_origin_trials(frame_id:)
|
258
|
+
@devtools.send_cmd('Page.getOriginTrials',
|
259
|
+
frameId: frame_id)
|
260
|
+
end
|
261
|
+
|
262
|
+
def set_device_metrics_override(width:, height:, device_scale_factor:, mobile:, scale: nil, screen_width: nil, screen_height: nil, position_x: nil, position_y: nil, dont_set_visible_size: nil, screen_orientation: nil, viewport: nil)
|
263
|
+
@devtools.send_cmd('Page.setDeviceMetricsOverride',
|
264
|
+
width: width,
|
265
|
+
height: height,
|
266
|
+
deviceScaleFactor: device_scale_factor,
|
267
|
+
mobile: mobile,
|
268
|
+
scale: scale,
|
269
|
+
screenWidth: screen_width,
|
270
|
+
screenHeight: screen_height,
|
271
|
+
positionX: position_x,
|
272
|
+
positionY: position_y,
|
273
|
+
dontSetVisibleSize: dont_set_visible_size,
|
274
|
+
screenOrientation: screen_orientation,
|
275
|
+
viewport: viewport)
|
276
|
+
end
|
277
|
+
|
278
|
+
def set_device_orientation_override(alpha:, beta:, gamma:)
|
279
|
+
@devtools.send_cmd('Page.setDeviceOrientationOverride',
|
280
|
+
alpha: alpha,
|
281
|
+
beta: beta,
|
282
|
+
gamma: gamma)
|
283
|
+
end
|
284
|
+
|
285
|
+
def set_font_families(font_families:)
|
286
|
+
@devtools.send_cmd('Page.setFontFamilies',
|
287
|
+
fontFamilies: font_families)
|
288
|
+
end
|
289
|
+
|
290
|
+
def set_font_sizes(font_sizes:)
|
291
|
+
@devtools.send_cmd('Page.setFontSizes',
|
292
|
+
fontSizes: font_sizes)
|
293
|
+
end
|
294
|
+
|
295
|
+
def set_document_content(frame_id:, html:)
|
296
|
+
@devtools.send_cmd('Page.setDocumentContent',
|
297
|
+
frameId: frame_id,
|
298
|
+
html: html)
|
299
|
+
end
|
300
|
+
|
301
|
+
def set_download_behavior(behavior:, download_path: nil)
|
302
|
+
@devtools.send_cmd('Page.setDownloadBehavior',
|
303
|
+
behavior: behavior,
|
304
|
+
downloadPath: download_path)
|
305
|
+
end
|
306
|
+
|
307
|
+
def set_geolocation_override(latitude: nil, longitude: nil, accuracy: nil)
|
308
|
+
@devtools.send_cmd('Page.setGeolocationOverride',
|
309
|
+
latitude: latitude,
|
310
|
+
longitude: longitude,
|
311
|
+
accuracy: accuracy)
|
312
|
+
end
|
313
|
+
|
314
|
+
def set_lifecycle_events_enabled(enabled:)
|
315
|
+
@devtools.send_cmd('Page.setLifecycleEventsEnabled',
|
316
|
+
enabled: enabled)
|
317
|
+
end
|
318
|
+
|
319
|
+
def set_touch_emulation_enabled(enabled:, configuration: nil)
|
320
|
+
@devtools.send_cmd('Page.setTouchEmulationEnabled',
|
321
|
+
enabled: enabled,
|
322
|
+
configuration: configuration)
|
323
|
+
end
|
324
|
+
|
325
|
+
def start_screencast(format: nil, quality: nil, max_width: nil, max_height: nil, every_nth_frame: nil)
|
326
|
+
@devtools.send_cmd('Page.startScreencast',
|
327
|
+
format: format,
|
328
|
+
quality: quality,
|
329
|
+
maxWidth: max_width,
|
330
|
+
maxHeight: max_height,
|
331
|
+
everyNthFrame: every_nth_frame)
|
332
|
+
end
|
333
|
+
|
334
|
+
def stop_loading
|
335
|
+
@devtools.send_cmd('Page.stopLoading')
|
336
|
+
end
|
337
|
+
|
338
|
+
def crash
|
339
|
+
@devtools.send_cmd('Page.crash')
|
340
|
+
end
|
341
|
+
|
342
|
+
def close
|
343
|
+
@devtools.send_cmd('Page.close')
|
344
|
+
end
|
345
|
+
|
346
|
+
def set_web_lifecycle_state(state:)
|
347
|
+
@devtools.send_cmd('Page.setWebLifecycleState',
|
348
|
+
state: state)
|
349
|
+
end
|
350
|
+
|
351
|
+
def stop_screencast
|
352
|
+
@devtools.send_cmd('Page.stopScreencast')
|
353
|
+
end
|
354
|
+
|
355
|
+
def produce_compilation_cache(scripts:)
|
356
|
+
@devtools.send_cmd('Page.produceCompilationCache',
|
357
|
+
scripts: scripts)
|
358
|
+
end
|
359
|
+
|
360
|
+
def add_compilation_cache(url:, data:)
|
361
|
+
@devtools.send_cmd('Page.addCompilationCache',
|
362
|
+
url: url,
|
363
|
+
data: data)
|
364
|
+
end
|
365
|
+
|
366
|
+
def clear_compilation_cache
|
367
|
+
@devtools.send_cmd('Page.clearCompilationCache')
|
368
|
+
end
|
369
|
+
|
370
|
+
def set_spc_transaction_mode(mode:)
|
371
|
+
@devtools.send_cmd('Page.setSPCTransactionMode',
|
372
|
+
mode: mode)
|
373
|
+
end
|
374
|
+
|
375
|
+
def generate_test_report(message:, group: nil)
|
376
|
+
@devtools.send_cmd('Page.generateTestReport',
|
377
|
+
message: message,
|
378
|
+
group: group)
|
379
|
+
end
|
380
|
+
|
381
|
+
def wait_for_debugger
|
382
|
+
@devtools.send_cmd('Page.waitForDebugger')
|
383
|
+
end
|
384
|
+
|
385
|
+
def set_intercept_file_chooser_dialog(enabled:)
|
386
|
+
@devtools.send_cmd('Page.setInterceptFileChooserDialog',
|
387
|
+
enabled: enabled)
|
388
|
+
end
|
389
|
+
|
390
|
+
end # Page
|
391
|
+
end # V98
|
392
|
+
end # DevTools
|
393
|
+
end # Selenium
|
@@ -0,0 +1,59 @@
|
|
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. Any changes will be lost!
|
21
|
+
module Selenium
|
22
|
+
module DevTools
|
23
|
+
module V98
|
24
|
+
class Performance
|
25
|
+
EVENTS = {
|
26
|
+
metrics: 'metrics',
|
27
|
+
}.freeze
|
28
|
+
|
29
|
+
def initialize(devtools)
|
30
|
+
@devtools = devtools
|
31
|
+
end
|
32
|
+
|
33
|
+
def on(event, &block)
|
34
|
+
event = EVENTS[event] if event.is_a?(Symbol)
|
35
|
+
@devtools.callbacks["Performance.#{event}"] << block
|
36
|
+
end
|
37
|
+
|
38
|
+
def disable
|
39
|
+
@devtools.send_cmd('Performance.disable')
|
40
|
+
end
|
41
|
+
|
42
|
+
def enable(time_domain: nil)
|
43
|
+
@devtools.send_cmd('Performance.enable',
|
44
|
+
timeDomain: time_domain)
|
45
|
+
end
|
46
|
+
|
47
|
+
def set_time_domain(time_domain:)
|
48
|
+
@devtools.send_cmd('Performance.setTimeDomain',
|
49
|
+
timeDomain: time_domain)
|
50
|
+
end
|
51
|
+
|
52
|
+
def get_metrics
|
53
|
+
@devtools.send_cmd('Performance.getMetrics')
|
54
|
+
end
|
55
|
+
|
56
|
+
end # Performance
|
57
|
+
end # V98
|
58
|
+
end # DevTools
|
59
|
+
end # Selenium
|
@@ -0,0 +1,46 @@
|
|
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. Any changes will be lost!
|
21
|
+
module Selenium
|
22
|
+
module DevTools
|
23
|
+
module V98
|
24
|
+
class PerformanceTimeline
|
25
|
+
EVENTS = {
|
26
|
+
timeline_event_added: 'timelineEventAdded',
|
27
|
+
}.freeze
|
28
|
+
|
29
|
+
def initialize(devtools)
|
30
|
+
@devtools = devtools
|
31
|
+
end
|
32
|
+
|
33
|
+
def on(event, &block)
|
34
|
+
event = EVENTS[event] if event.is_a?(Symbol)
|
35
|
+
@devtools.callbacks["PerformanceTimeline.#{event}"] << block
|
36
|
+
end
|
37
|
+
|
38
|
+
def enable(event_types:)
|
39
|
+
@devtools.send_cmd('PerformanceTimeline.enable',
|
40
|
+
eventTypes: event_types)
|
41
|
+
end
|
42
|
+
|
43
|
+
end # PerformanceTimeline
|
44
|
+
end # V98
|
45
|
+
end # DevTools
|
46
|
+
end # Selenium
|
@@ -0,0 +1,95 @@
|
|
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. Any changes will be lost!
|
21
|
+
module Selenium
|
22
|
+
module DevTools
|
23
|
+
module V98
|
24
|
+
class Profiler
|
25
|
+
EVENTS = {
|
26
|
+
console_profile_finished: 'consoleProfileFinished',
|
27
|
+
console_profile_started: 'consoleProfileStarted',
|
28
|
+
precise_coverage_delta_update: 'preciseCoverageDeltaUpdate',
|
29
|
+
}.freeze
|
30
|
+
|
31
|
+
def initialize(devtools)
|
32
|
+
@devtools = devtools
|
33
|
+
end
|
34
|
+
|
35
|
+
def on(event, &block)
|
36
|
+
event = EVENTS[event] if event.is_a?(Symbol)
|
37
|
+
@devtools.callbacks["Profiler.#{event}"] << block
|
38
|
+
end
|
39
|
+
|
40
|
+
def disable
|
41
|
+
@devtools.send_cmd('Profiler.disable')
|
42
|
+
end
|
43
|
+
|
44
|
+
def enable
|
45
|
+
@devtools.send_cmd('Profiler.enable')
|
46
|
+
end
|
47
|
+
|
48
|
+
def get_best_effort_coverage
|
49
|
+
@devtools.send_cmd('Profiler.getBestEffortCoverage')
|
50
|
+
end
|
51
|
+
|
52
|
+
def set_sampling_interval(interval:)
|
53
|
+
@devtools.send_cmd('Profiler.setSamplingInterval',
|
54
|
+
interval: interval)
|
55
|
+
end
|
56
|
+
|
57
|
+
def start
|
58
|
+
@devtools.send_cmd('Profiler.start')
|
59
|
+
end
|
60
|
+
|
61
|
+
def start_precise_coverage(call_count: nil, detailed: nil, allow_triggered_updates: nil)
|
62
|
+
@devtools.send_cmd('Profiler.startPreciseCoverage',
|
63
|
+
callCount: call_count,
|
64
|
+
detailed: detailed,
|
65
|
+
allowTriggeredUpdates: allow_triggered_updates)
|
66
|
+
end
|
67
|
+
|
68
|
+
def start_type_profile
|
69
|
+
@devtools.send_cmd('Profiler.startTypeProfile')
|
70
|
+
end
|
71
|
+
|
72
|
+
def stop
|
73
|
+
@devtools.send_cmd('Profiler.stop')
|
74
|
+
end
|
75
|
+
|
76
|
+
def stop_precise_coverage
|
77
|
+
@devtools.send_cmd('Profiler.stopPreciseCoverage')
|
78
|
+
end
|
79
|
+
|
80
|
+
def stop_type_profile
|
81
|
+
@devtools.send_cmd('Profiler.stopTypeProfile')
|
82
|
+
end
|
83
|
+
|
84
|
+
def take_precise_coverage
|
85
|
+
@devtools.send_cmd('Profiler.takePreciseCoverage')
|
86
|
+
end
|
87
|
+
|
88
|
+
def take_type_profile
|
89
|
+
@devtools.send_cmd('Profiler.takeTypeProfile')
|
90
|
+
end
|
91
|
+
|
92
|
+
end # Profiler
|
93
|
+
end # V98
|
94
|
+
end # DevTools
|
95
|
+
end # Selenium
|