selenium-webdriver 4.0.0.alpha2 → 4.0.0.alpha7
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +5 -5
- data/CHANGES +172 -4
- data/LICENSE +1 -1
- data/lib/selenium/server.rb +25 -9
- data/lib/selenium/webdriver.rb +12 -8
- data/lib/selenium/webdriver/atoms/findElements.js +121 -0
- data/lib/selenium/webdriver/atoms/getAttribute.js +104 -7
- data/lib/selenium/webdriver/atoms/isDisplayed.js +76 -78
- data/lib/selenium/webdriver/atoms/mutationListener.js +38 -0
- data/lib/selenium/webdriver/chrome.rb +10 -9
- data/lib/selenium/webdriver/chrome/bridge.rb +20 -4
- data/lib/selenium/webdriver/chrome/driver.rb +7 -49
- data/lib/selenium/webdriver/chrome/options.rb +97 -57
- data/lib/selenium/webdriver/chrome/profile.rb +3 -3
- data/lib/selenium/webdriver/chrome/service.rb +0 -4
- data/lib/selenium/webdriver/common.rb +6 -1
- data/lib/selenium/webdriver/common/driver.rb +81 -17
- data/lib/selenium/webdriver/common/driver_extensions/has_authentication.rb +89 -0
- data/lib/selenium/webdriver/common/driver_extensions/has_devtools.rb +39 -0
- data/lib/selenium/webdriver/common/driver_extensions/has_log_events.rb +143 -0
- data/lib/selenium/webdriver/common/driver_extensions/takes_screenshot.rb +2 -1
- data/lib/selenium/webdriver/common/element.rb +5 -0
- data/lib/selenium/webdriver/common/logger.rb +48 -16
- data/lib/selenium/webdriver/common/manager.rb +5 -0
- data/lib/selenium/webdriver/common/options.rb +116 -0
- data/lib/selenium/webdriver/common/platform.rb +4 -1
- data/lib/selenium/webdriver/common/port_prober.rb +4 -6
- data/lib/selenium/webdriver/common/profile_helper.rb +10 -2
- data/lib/selenium/webdriver/common/proxy.rb +0 -0
- data/lib/selenium/webdriver/common/search_context.rb +3 -2
- data/lib/selenium/webdriver/common/service.rb +30 -113
- data/lib/selenium/webdriver/common/service_manager.rb +151 -0
- data/lib/selenium/webdriver/common/socket_lock.rb +2 -2
- data/lib/selenium/webdriver/common/takes_screenshot.rb +63 -0
- data/lib/selenium/webdriver/common/wait.rb +1 -1
- data/lib/selenium/webdriver/devtools.rb +132 -0
- data/lib/selenium/webdriver/devtools/console_event.rb +38 -0
- data/lib/selenium/webdriver/devtools/exception_event.rb +36 -0
- data/lib/selenium/webdriver/devtools/mutation_event.rb +37 -0
- data/lib/selenium/webdriver/devtools/v84/accessibility.rb +64 -0
- data/lib/selenium/webdriver/devtools/v84/animation.rb +100 -0
- data/lib/selenium/webdriver/devtools/v84/application_cache.rb +66 -0
- data/lib/selenium/webdriver/devtools/v84/audits.rb +63 -0
- data/lib/selenium/webdriver/devtools/v84/background_service.rb +69 -0
- data/lib/selenium/webdriver/devtools/v84/browser.rb +125 -0
- data/lib/selenium/webdriver/devtools/v84/cache_storage.rb +75 -0
- data/lib/selenium/webdriver/devtools/v84/cast.rb +72 -0
- data/lib/selenium/webdriver/devtools/v84/console.rb +59 -0
- data/lib/selenium/webdriver/devtools/v84/css.rb +167 -0
- data/lib/selenium/webdriver/devtools/v84/database.rb +66 -0
- data/lib/selenium/webdriver/devtools/v84/debugger.rb +231 -0
- data/lib/selenium/webdriver/devtools/v84/device_orientation.rb +55 -0
- data/lib/selenium/webdriver/devtools/v84/dom.rb +322 -0
- data/lib/selenium/webdriver/devtools/v84/dom_debugger.rb +95 -0
- data/lib/selenium/webdriver/devtools/v84/dom_snapshot.rb +67 -0
- data/lib/selenium/webdriver/devtools/v84/dom_storage.rb +81 -0
- data/lib/selenium/webdriver/devtools/v84/emulation.rb +182 -0
- data/lib/selenium/webdriver/devtools/v84/fetch.rb +99 -0
- data/lib/selenium/webdriver/devtools/v84/headless_experimental.rb +63 -0
- data/lib/selenium/webdriver/devtools/v84/heap_profiler.rb +109 -0
- data/lib/selenium/webdriver/devtools/v84/indexed_db.rb +102 -0
- data/lib/selenium/webdriver/devtools/v84/input.rb +142 -0
- data/lib/selenium/webdriver/devtools/v84/inspector.rb +57 -0
- data/lib/selenium/webdriver/devtools/v84/io.rb +61 -0
- data/lib/selenium/webdriver/devtools/v84/layer_tree.rb +97 -0
- data/lib/selenium/webdriver/devtools/v84/log.rb +68 -0
- data/lib/selenium/webdriver/devtools/v84/media.rb +59 -0
- data/lib/selenium/webdriver/devtools/v84/memory.rb +88 -0
- data/lib/selenium/webdriver/devtools/v84/network.rb +230 -0
- data/lib/selenium/webdriver/devtools/v84/overlay.rb +159 -0
- data/lib/selenium/webdriver/devtools/v84/page.rb +376 -0
- data/lib/selenium/webdriver/devtools/v84/performance.rb +65 -0
- data/lib/selenium/webdriver/devtools/v84/profiler.rb +113 -0
- data/lib/selenium/webdriver/devtools/v84/runtime.rb +195 -0
- data/lib/selenium/webdriver/devtools/v84/schema.rb +48 -0
- data/lib/selenium/webdriver/devtools/v84/security.rb +73 -0
- data/lib/selenium/webdriver/devtools/v84/service_worker.rb +118 -0
- data/lib/selenium/webdriver/devtools/v84/storage.rb +97 -0
- data/lib/selenium/webdriver/devtools/v84/system_info.rb +52 -0
- data/lib/selenium/webdriver/devtools/v84/target.rb +143 -0
- data/lib/selenium/webdriver/devtools/v84/tethering.rb +57 -0
- data/lib/selenium/webdriver/devtools/v84/tracing.rb +78 -0
- data/lib/selenium/webdriver/devtools/v84/web_audio.rb +72 -0
- data/lib/selenium/webdriver/devtools/v84/web_authn.rb +96 -0
- data/lib/selenium/webdriver/devtools/v85/accessibility.rb +64 -0
- data/lib/selenium/webdriver/devtools/v85/animation.rb +100 -0
- data/lib/selenium/webdriver/devtools/v85/application_cache.rb +66 -0
- data/lib/selenium/webdriver/devtools/v85/audits.rb +63 -0
- data/lib/selenium/webdriver/devtools/v85/background_service.rb +69 -0
- data/lib/selenium/webdriver/devtools/v85/browser.rb +125 -0
- data/lib/selenium/webdriver/devtools/v85/cache_storage.rb +75 -0
- data/lib/selenium/webdriver/devtools/v85/cast.rb +72 -0
- data/lib/selenium/webdriver/devtools/v85/console.rb +59 -0
- data/lib/selenium/webdriver/devtools/v85/css.rb +167 -0
- data/lib/selenium/webdriver/devtools/v85/database.rb +66 -0
- data/lib/selenium/webdriver/devtools/v85/debugger.rb +231 -0
- data/lib/selenium/webdriver/devtools/v85/device_orientation.rb +55 -0
- data/lib/selenium/webdriver/devtools/v85/dom.rb +322 -0
- data/lib/selenium/webdriver/devtools/v85/dom_debugger.rb +95 -0
- data/lib/selenium/webdriver/devtools/v85/dom_snapshot.rb +67 -0
- data/lib/selenium/webdriver/devtools/v85/dom_storage.rb +81 -0
- data/lib/selenium/webdriver/devtools/v85/emulation.rb +182 -0
- data/lib/selenium/webdriver/devtools/v85/fetch.rb +99 -0
- data/lib/selenium/webdriver/devtools/v85/headless_experimental.rb +63 -0
- data/lib/selenium/webdriver/devtools/v85/heap_profiler.rb +109 -0
- data/lib/selenium/webdriver/devtools/v85/indexed_db.rb +102 -0
- data/lib/selenium/webdriver/devtools/v85/input.rb +143 -0
- data/lib/selenium/webdriver/devtools/v85/inspector.rb +57 -0
- data/lib/selenium/webdriver/devtools/v85/io.rb +61 -0
- data/lib/selenium/webdriver/devtools/v85/layer_tree.rb +97 -0
- data/lib/selenium/webdriver/devtools/v85/log.rb +68 -0
- data/lib/selenium/webdriver/devtools/v85/media.rb +59 -0
- data/lib/selenium/webdriver/devtools/v85/memory.rb +88 -0
- data/lib/selenium/webdriver/devtools/v85/network.rb +230 -0
- data/lib/selenium/webdriver/devtools/v85/overlay.rb +160 -0
- data/lib/selenium/webdriver/devtools/v85/page.rb +376 -0
- data/lib/selenium/webdriver/devtools/v85/performance.rb +65 -0
- data/lib/selenium/webdriver/devtools/v85/profiler.rb +113 -0
- data/lib/selenium/webdriver/devtools/v85/runtime.rb +196 -0
- data/lib/selenium/webdriver/devtools/v85/schema.rb +48 -0
- data/lib/selenium/webdriver/devtools/v85/security.rb +73 -0
- data/lib/selenium/webdriver/devtools/v85/service_worker.rb +118 -0
- data/lib/selenium/webdriver/devtools/v85/storage.rb +97 -0
- data/lib/selenium/webdriver/devtools/v85/system_info.rb +52 -0
- data/lib/selenium/webdriver/devtools/v85/target.rb +145 -0
- data/lib/selenium/webdriver/devtools/v85/tethering.rb +57 -0
- data/lib/selenium/webdriver/devtools/v85/tracing.rb +78 -0
- data/lib/selenium/webdriver/devtools/v85/web_audio.rb +72 -0
- data/lib/selenium/webdriver/devtools/v85/web_authn.rb +96 -0
- data/lib/selenium/webdriver/devtools/v86/accessibility.rb +64 -0
- data/lib/selenium/webdriver/devtools/v86/animation.rb +100 -0
- data/lib/selenium/webdriver/devtools/v86/application_cache.rb +66 -0
- data/lib/selenium/webdriver/devtools/v86/audits.rb +63 -0
- data/lib/selenium/webdriver/devtools/v86/background_service.rb +69 -0
- data/lib/selenium/webdriver/devtools/v86/browser.rb +125 -0
- data/lib/selenium/webdriver/devtools/v86/cache_storage.rb +75 -0
- data/lib/selenium/webdriver/devtools/v86/cast.rb +72 -0
- data/lib/selenium/webdriver/devtools/v86/console.rb +59 -0
- data/lib/selenium/webdriver/devtools/v86/css.rb +181 -0
- data/lib/selenium/webdriver/devtools/v86/database.rb +66 -0
- data/lib/selenium/webdriver/devtools/v86/debugger.rb +233 -0
- data/lib/selenium/webdriver/devtools/v86/device_orientation.rb +55 -0
- data/lib/selenium/webdriver/devtools/v86/dom.rb +329 -0
- data/lib/selenium/webdriver/devtools/v86/dom_debugger.rb +95 -0
- data/lib/selenium/webdriver/devtools/v86/dom_snapshot.rb +67 -0
- data/lib/selenium/webdriver/devtools/v86/dom_storage.rb +81 -0
- data/lib/selenium/webdriver/devtools/v86/emulation.rb +193 -0
- data/lib/selenium/webdriver/devtools/v86/fetch.rb +99 -0
- data/lib/selenium/webdriver/devtools/v86/headless_experimental.rb +63 -0
- data/lib/selenium/webdriver/devtools/v86/heap_profiler.rb +109 -0
- data/lib/selenium/webdriver/devtools/v86/indexed_db.rb +102 -0
- data/lib/selenium/webdriver/devtools/v86/input.rb +143 -0
- data/lib/selenium/webdriver/devtools/v86/inspector.rb +57 -0
- data/lib/selenium/webdriver/devtools/v86/io.rb +61 -0
- data/lib/selenium/webdriver/devtools/v86/layer_tree.rb +97 -0
- data/lib/selenium/webdriver/devtools/v86/log.rb +68 -0
- data/lib/selenium/webdriver/devtools/v86/media.rb +59 -0
- data/lib/selenium/webdriver/devtools/v86/memory.rb +88 -0
- data/lib/selenium/webdriver/devtools/v86/network.rb +235 -0
- data/lib/selenium/webdriver/devtools/v86/overlay.rb +183 -0
- data/lib/selenium/webdriver/devtools/v86/page.rb +376 -0
- data/lib/selenium/webdriver/devtools/v86/performance.rb +65 -0
- data/lib/selenium/webdriver/devtools/v86/profiler.rb +113 -0
- data/lib/selenium/webdriver/devtools/v86/runtime.rb +196 -0
- data/lib/selenium/webdriver/devtools/v86/schema.rb +48 -0
- data/lib/selenium/webdriver/devtools/v86/security.rb +73 -0
- data/lib/selenium/webdriver/devtools/v86/service_worker.rb +118 -0
- data/lib/selenium/webdriver/devtools/v86/storage.rb +97 -0
- data/lib/selenium/webdriver/devtools/v86/system_info.rb +52 -0
- data/lib/selenium/webdriver/devtools/v86/target.rb +145 -0
- data/lib/selenium/webdriver/devtools/v86/tethering.rb +57 -0
- data/lib/selenium/webdriver/devtools/v86/tracing.rb +78 -0
- data/lib/selenium/webdriver/devtools/v86/web_audio.rb +72 -0
- data/lib/selenium/webdriver/devtools/v86/web_authn.rb +102 -0
- data/lib/selenium/webdriver/devtools/v87/accessibility.rb +73 -0
- data/lib/selenium/webdriver/devtools/v87/animation.rb +100 -0
- data/lib/selenium/webdriver/devtools/v87/application_cache.rb +66 -0
- data/lib/selenium/webdriver/devtools/v87/audits.rb +63 -0
- data/lib/selenium/webdriver/devtools/v87/background_service.rb +69 -0
- data/lib/selenium/webdriver/devtools/v87/browser.rb +125 -0
- data/lib/selenium/webdriver/devtools/v87/cache_storage.rb +75 -0
- data/lib/selenium/webdriver/devtools/v87/cast.rb +72 -0
- data/lib/selenium/webdriver/devtools/v87/console.rb +59 -0
- data/lib/selenium/webdriver/devtools/v87/css.rb +181 -0
- data/lib/selenium/webdriver/devtools/v87/database.rb +66 -0
- data/lib/selenium/webdriver/devtools/v87/debugger.rb +233 -0
- data/lib/selenium/webdriver/devtools/v87/device_orientation.rb +55 -0
- data/lib/selenium/webdriver/devtools/v87/dom.rb +329 -0
- data/lib/selenium/webdriver/devtools/v87/dom_debugger.rb +95 -0
- data/lib/selenium/webdriver/devtools/v87/dom_snapshot.rb +67 -0
- data/lib/selenium/webdriver/devtools/v87/dom_storage.rb +81 -0
- data/lib/selenium/webdriver/devtools/v87/emulation.rb +193 -0
- data/lib/selenium/webdriver/devtools/v87/fetch.rb +99 -0
- data/lib/selenium/webdriver/devtools/v87/headless_experimental.rb +63 -0
- data/lib/selenium/webdriver/devtools/v87/heap_profiler.rb +109 -0
- data/lib/selenium/webdriver/devtools/v87/indexed_db.rb +102 -0
- data/lib/selenium/webdriver/devtools/v87/input.rb +143 -0
- data/lib/selenium/webdriver/devtools/v87/inspector.rb +57 -0
- data/lib/selenium/webdriver/devtools/v87/io.rb +61 -0
- data/lib/selenium/webdriver/devtools/v87/layer_tree.rb +97 -0
- data/lib/selenium/webdriver/devtools/v87/log.rb +68 -0
- data/lib/selenium/webdriver/devtools/v87/media.rb +59 -0
- data/lib/selenium/webdriver/devtools/v87/memory.rb +88 -0
- data/lib/selenium/webdriver/devtools/v87/network.rb +247 -0
- data/lib/selenium/webdriver/devtools/v87/overlay.rb +183 -0
- data/lib/selenium/webdriver/devtools/v87/page.rb +376 -0
- data/lib/selenium/webdriver/devtools/v87/performance.rb +65 -0
- data/lib/selenium/webdriver/devtools/v87/profiler.rb +125 -0
- data/lib/selenium/webdriver/devtools/v87/runtime.rb +196 -0
- data/lib/selenium/webdriver/devtools/v87/schema.rb +48 -0
- data/lib/selenium/webdriver/devtools/v87/security.rb +73 -0
- data/lib/selenium/webdriver/devtools/v87/service_worker.rb +118 -0
- data/lib/selenium/webdriver/devtools/v87/storage.rb +97 -0
- data/lib/selenium/webdriver/devtools/v87/system_info.rb +52 -0
- data/lib/selenium/webdriver/devtools/v87/target.rb +145 -0
- data/lib/selenium/webdriver/devtools/v87/tethering.rb +57 -0
- data/lib/selenium/webdriver/devtools/v87/tracing.rb +78 -0
- data/lib/selenium/webdriver/devtools/v87/web_audio.rb +72 -0
- data/lib/selenium/webdriver/devtools/v87/web_authn.rb +102 -0
- data/lib/selenium/webdriver/edge.rb +29 -9
- data/lib/selenium/webdriver/edge_chrome/bridge.rb +37 -0
- data/lib/selenium/webdriver/edge_chrome/driver.rb +48 -0
- data/lib/selenium/webdriver/edge_chrome/options.rb +37 -0
- data/lib/selenium/webdriver/edge_chrome/profile.rb +33 -0
- data/lib/selenium/webdriver/edge_chrome/service.rb +36 -0
- data/lib/selenium/webdriver/{edge → edge_html}/driver.rb +3 -35
- data/lib/selenium/webdriver/{edge → edge_html}/options.rb +26 -22
- data/lib/selenium/webdriver/{edge → edge_html}/service.rb +2 -6
- data/lib/selenium/webdriver/firefox.rb +18 -15
- data/lib/selenium/webdriver/firefox/bridge.rb +1 -1
- data/lib/selenium/webdriver/firefox/driver.rb +2 -31
- data/lib/selenium/webdriver/firefox/extension.rb +8 -0
- data/lib/selenium/webdriver/firefox/options.rb +47 -52
- data/lib/selenium/webdriver/firefox/profile.rb +7 -78
- data/lib/selenium/webdriver/firefox/service.rb +0 -4
- data/lib/selenium/webdriver/ie.rb +8 -7
- data/lib/selenium/webdriver/ie/driver.rb +0 -33
- data/lib/selenium/webdriver/ie/options.rb +10 -33
- data/lib/selenium/webdriver/ie/service.rb +5 -9
- data/lib/selenium/webdriver/remote.rb +16 -10
- data/lib/selenium/webdriver/remote/bridge.rb +38 -42
- data/lib/selenium/webdriver/remote/capabilities.rb +25 -7
- data/lib/selenium/webdriver/remote/driver.rb +6 -13
- data/lib/selenium/webdriver/remote/http/default.rb +10 -6
- data/lib/selenium/webdriver/remote/http/persistent.rb +5 -6
- data/lib/selenium/webdriver/safari.rb +16 -8
- data/lib/selenium/webdriver/safari/bridge.rb +4 -4
- data/lib/selenium/webdriver/safari/driver.rb +3 -30
- data/lib/selenium/webdriver/safari/options.rb +18 -19
- data/lib/selenium/webdriver/safari/service.rb +0 -4
- data/lib/selenium/webdriver/support.rb +1 -0
- data/lib/selenium/webdriver/support/color.rb +2 -2
- data/lib/selenium/webdriver/support/event_firing_bridge.rb +1 -1
- data/lib/selenium/webdriver/support/relative_locator.rb +51 -0
- data/lib/selenium/webdriver/version.rb +1 -1
- data/selenium-webdriver.gemspec +7 -6
- metadata +225 -21
- data/lib/selenium/webdriver/firefox/binary.rb +0 -110
- data/lib/selenium/webdriver/firefox/extension/prefs.json +0 -69
@@ -0,0 +1,109 @@
|
|
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 WebDriver
|
23
|
+
class DevTools
|
24
|
+
def heap_profiler
|
25
|
+
@heap_profiler ||= V84::HeapProfiler.new(self)
|
26
|
+
end
|
27
|
+
|
28
|
+
module V84
|
29
|
+
class HeapProfiler
|
30
|
+
EVENTS = {
|
31
|
+
add_heap_snapshot_chunk: 'addHeapSnapshotChunk',
|
32
|
+
heap_stats_update: 'heapStatsUpdate',
|
33
|
+
last_seen_object_id: 'lastSeenObjectId',
|
34
|
+
report_heap_snapshot_progress: 'reportHeapSnapshotProgress',
|
35
|
+
reset_profiles: 'resetProfiles',
|
36
|
+
}.freeze
|
37
|
+
|
38
|
+
def initialize(devtools)
|
39
|
+
@devtools = devtools
|
40
|
+
end
|
41
|
+
|
42
|
+
def on(event, &block)
|
43
|
+
event = EVENTS[event] if event.is_a?(Symbol)
|
44
|
+
@devtools.callbacks["HeapProfiler.#{event}"] << block
|
45
|
+
end
|
46
|
+
|
47
|
+
def add_inspected_heap_object(heap_object_id:)
|
48
|
+
@devtools.send_cmd('HeapProfiler.addInspectedHeapObject',
|
49
|
+
heapObjectId: heap_object_id)
|
50
|
+
end
|
51
|
+
|
52
|
+
def collect_garbage
|
53
|
+
@devtools.send_cmd('HeapProfiler.collectGarbage')
|
54
|
+
end
|
55
|
+
|
56
|
+
def disable
|
57
|
+
@devtools.send_cmd('HeapProfiler.disable')
|
58
|
+
end
|
59
|
+
|
60
|
+
def enable
|
61
|
+
@devtools.send_cmd('HeapProfiler.enable')
|
62
|
+
end
|
63
|
+
|
64
|
+
def get_heap_object_id(object_id:)
|
65
|
+
@devtools.send_cmd('HeapProfiler.getHeapObjectId',
|
66
|
+
objectId: object_id)
|
67
|
+
end
|
68
|
+
|
69
|
+
def get_object_by_heap_object_id(object_id:, object_group: nil)
|
70
|
+
@devtools.send_cmd('HeapProfiler.getObjectByHeapObjectId',
|
71
|
+
objectId: object_id,
|
72
|
+
objectGroup: object_group)
|
73
|
+
end
|
74
|
+
|
75
|
+
def get_sampling_profile
|
76
|
+
@devtools.send_cmd('HeapProfiler.getSamplingProfile')
|
77
|
+
end
|
78
|
+
|
79
|
+
def start_sampling(sampling_interval: nil)
|
80
|
+
@devtools.send_cmd('HeapProfiler.startSampling',
|
81
|
+
samplingInterval: sampling_interval)
|
82
|
+
end
|
83
|
+
|
84
|
+
def start_tracking_heap_objects(track_allocations: nil)
|
85
|
+
@devtools.send_cmd('HeapProfiler.startTrackingHeapObjects',
|
86
|
+
trackAllocations: track_allocations)
|
87
|
+
end
|
88
|
+
|
89
|
+
def stop_sampling
|
90
|
+
@devtools.send_cmd('HeapProfiler.stopSampling')
|
91
|
+
end
|
92
|
+
|
93
|
+
def stop_tracking_heap_objects(report_progress: nil, treat_global_objects_as_roots: nil)
|
94
|
+
@devtools.send_cmd('HeapProfiler.stopTrackingHeapObjects',
|
95
|
+
reportProgress: report_progress,
|
96
|
+
treatGlobalObjectsAsRoots: treat_global_objects_as_roots)
|
97
|
+
end
|
98
|
+
|
99
|
+
def take_heap_snapshot(report_progress: nil, treat_global_objects_as_roots: nil)
|
100
|
+
@devtools.send_cmd('HeapProfiler.takeHeapSnapshot',
|
101
|
+
reportProgress: report_progress,
|
102
|
+
treatGlobalObjectsAsRoots: treat_global_objects_as_roots)
|
103
|
+
end
|
104
|
+
|
105
|
+
end # V84
|
106
|
+
end # HeapProfiler
|
107
|
+
end # DevTools
|
108
|
+
end # WebDriver
|
109
|
+
end # Selenium
|
@@ -0,0 +1,102 @@
|
|
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 WebDriver
|
23
|
+
class DevTools
|
24
|
+
def indexed_db
|
25
|
+
@indexed_db ||= V84::IndexedDB.new(self)
|
26
|
+
end
|
27
|
+
|
28
|
+
module V84
|
29
|
+
class IndexedDB
|
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["IndexedDB.#{event}"] << block
|
38
|
+
end
|
39
|
+
|
40
|
+
def clear_object_store(security_origin:, database_name:, object_store_name:)
|
41
|
+
@devtools.send_cmd('IndexedDB.clearObjectStore',
|
42
|
+
securityOrigin: security_origin,
|
43
|
+
databaseName: database_name,
|
44
|
+
objectStoreName: object_store_name)
|
45
|
+
end
|
46
|
+
|
47
|
+
def delete_database(security_origin:, database_name:)
|
48
|
+
@devtools.send_cmd('IndexedDB.deleteDatabase',
|
49
|
+
securityOrigin: security_origin,
|
50
|
+
databaseName: database_name)
|
51
|
+
end
|
52
|
+
|
53
|
+
def delete_object_store_entries(security_origin:, database_name:, object_store_name:, key_range:)
|
54
|
+
@devtools.send_cmd('IndexedDB.deleteObjectStoreEntries',
|
55
|
+
securityOrigin: security_origin,
|
56
|
+
databaseName: database_name,
|
57
|
+
objectStoreName: object_store_name,
|
58
|
+
keyRange: key_range)
|
59
|
+
end
|
60
|
+
|
61
|
+
def disable
|
62
|
+
@devtools.send_cmd('IndexedDB.disable')
|
63
|
+
end
|
64
|
+
|
65
|
+
def enable
|
66
|
+
@devtools.send_cmd('IndexedDB.enable')
|
67
|
+
end
|
68
|
+
|
69
|
+
def request_data(security_origin:, database_name:, object_store_name:, index_name:, skip_count:, page_size:, key_range: nil)
|
70
|
+
@devtools.send_cmd('IndexedDB.requestData',
|
71
|
+
securityOrigin: security_origin,
|
72
|
+
databaseName: database_name,
|
73
|
+
objectStoreName: object_store_name,
|
74
|
+
indexName: index_name,
|
75
|
+
skipCount: skip_count,
|
76
|
+
pageSize: page_size,
|
77
|
+
keyRange: key_range)
|
78
|
+
end
|
79
|
+
|
80
|
+
def get_metadata(security_origin:, database_name:, object_store_name:)
|
81
|
+
@devtools.send_cmd('IndexedDB.getMetadata',
|
82
|
+
securityOrigin: security_origin,
|
83
|
+
databaseName: database_name,
|
84
|
+
objectStoreName: object_store_name)
|
85
|
+
end
|
86
|
+
|
87
|
+
def request_database(security_origin:, database_name:)
|
88
|
+
@devtools.send_cmd('IndexedDB.requestDatabase',
|
89
|
+
securityOrigin: security_origin,
|
90
|
+
databaseName: database_name)
|
91
|
+
end
|
92
|
+
|
93
|
+
def request_database_names(security_origin:)
|
94
|
+
@devtools.send_cmd('IndexedDB.requestDatabaseNames',
|
95
|
+
securityOrigin: security_origin)
|
96
|
+
end
|
97
|
+
|
98
|
+
end # V84
|
99
|
+
end # IndexedDB
|
100
|
+
end # DevTools
|
101
|
+
end # WebDriver
|
102
|
+
end # Selenium
|
@@ -0,0 +1,142 @@
|
|
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 WebDriver
|
23
|
+
class DevTools
|
24
|
+
def input
|
25
|
+
@input ||= V84::Input.new(self)
|
26
|
+
end
|
27
|
+
|
28
|
+
module V84
|
29
|
+
class Input
|
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["Input.#{event}"] << block
|
38
|
+
end
|
39
|
+
|
40
|
+
def dispatch_key_event(type:, modifiers: nil, timestamp: nil, text: nil, unmodified_text: nil, key_identifier: nil, code: nil, key: nil, windows_virtual_key_code: nil, native_virtual_key_code: nil, auto_repeat: nil, is_keypad: nil, is_system_key: nil, location: nil)
|
41
|
+
@devtools.send_cmd('Input.dispatchKeyEvent',
|
42
|
+
type: type,
|
43
|
+
modifiers: modifiers,
|
44
|
+
timestamp: timestamp,
|
45
|
+
text: text,
|
46
|
+
unmodifiedText: unmodified_text,
|
47
|
+
keyIdentifier: key_identifier,
|
48
|
+
code: code,
|
49
|
+
key: key,
|
50
|
+
windowsVirtualKeyCode: windows_virtual_key_code,
|
51
|
+
nativeVirtualKeyCode: native_virtual_key_code,
|
52
|
+
autoRepeat: auto_repeat,
|
53
|
+
isKeypad: is_keypad,
|
54
|
+
isSystemKey: is_system_key,
|
55
|
+
location: location)
|
56
|
+
end
|
57
|
+
|
58
|
+
def insert_text(text:)
|
59
|
+
@devtools.send_cmd('Input.insertText',
|
60
|
+
text: text)
|
61
|
+
end
|
62
|
+
|
63
|
+
def dispatch_mouse_event(type:, x:, y:, modifiers: nil, timestamp: nil, button: nil, buttons: nil, click_count: nil, delta_x: nil, delta_y: nil, pointer_type: nil)
|
64
|
+
@devtools.send_cmd('Input.dispatchMouseEvent',
|
65
|
+
type: type,
|
66
|
+
x: x,
|
67
|
+
y: y,
|
68
|
+
modifiers: modifiers,
|
69
|
+
timestamp: timestamp,
|
70
|
+
button: button,
|
71
|
+
buttons: buttons,
|
72
|
+
clickCount: click_count,
|
73
|
+
deltaX: delta_x,
|
74
|
+
deltaY: delta_y,
|
75
|
+
pointerType: pointer_type)
|
76
|
+
end
|
77
|
+
|
78
|
+
def dispatch_touch_event(type:, touch_points:, modifiers: nil, timestamp: nil)
|
79
|
+
@devtools.send_cmd('Input.dispatchTouchEvent',
|
80
|
+
type: type,
|
81
|
+
touchPoints: touch_points,
|
82
|
+
modifiers: modifiers,
|
83
|
+
timestamp: timestamp)
|
84
|
+
end
|
85
|
+
|
86
|
+
def emulate_touch_from_mouse_event(type:, x:, y:, button:, timestamp: nil, delta_x: nil, delta_y: nil, modifiers: nil, click_count: nil)
|
87
|
+
@devtools.send_cmd('Input.emulateTouchFromMouseEvent',
|
88
|
+
type: type,
|
89
|
+
x: x,
|
90
|
+
y: y,
|
91
|
+
button: button,
|
92
|
+
timestamp: timestamp,
|
93
|
+
deltaX: delta_x,
|
94
|
+
deltaY: delta_y,
|
95
|
+
modifiers: modifiers,
|
96
|
+
clickCount: click_count)
|
97
|
+
end
|
98
|
+
|
99
|
+
def set_ignore_input_events(ignore:)
|
100
|
+
@devtools.send_cmd('Input.setIgnoreInputEvents',
|
101
|
+
ignore: ignore)
|
102
|
+
end
|
103
|
+
|
104
|
+
def synthesize_pinch_gesture(x:, y:, scale_factor:, relative_speed: nil, gesture_source_type: nil)
|
105
|
+
@devtools.send_cmd('Input.synthesizePinchGesture',
|
106
|
+
x: x,
|
107
|
+
y: y,
|
108
|
+
scaleFactor: scale_factor,
|
109
|
+
relativeSpeed: relative_speed,
|
110
|
+
gestureSourceType: gesture_source_type)
|
111
|
+
end
|
112
|
+
|
113
|
+
def synthesize_scroll_gesture(x:, y:, x_distance: nil, y_distance: nil, x_overscroll: nil, y_overscroll: nil, prevent_fling: nil, speed: nil, gesture_source_type: nil, repeat_count: nil, repeat_delay_ms: nil, interaction_marker_name: nil)
|
114
|
+
@devtools.send_cmd('Input.synthesizeScrollGesture',
|
115
|
+
x: x,
|
116
|
+
y: y,
|
117
|
+
xDistance: x_distance,
|
118
|
+
yDistance: y_distance,
|
119
|
+
xOverscroll: x_overscroll,
|
120
|
+
yOverscroll: y_overscroll,
|
121
|
+
preventFling: prevent_fling,
|
122
|
+
speed: speed,
|
123
|
+
gestureSourceType: gesture_source_type,
|
124
|
+
repeatCount: repeat_count,
|
125
|
+
repeatDelayMs: repeat_delay_ms,
|
126
|
+
interactionMarkerName: interaction_marker_name)
|
127
|
+
end
|
128
|
+
|
129
|
+
def synthesize_tap_gesture(x:, y:, duration: nil, tap_count: nil, gesture_source_type: nil)
|
130
|
+
@devtools.send_cmd('Input.synthesizeTapGesture',
|
131
|
+
x: x,
|
132
|
+
y: y,
|
133
|
+
duration: duration,
|
134
|
+
tapCount: tap_count,
|
135
|
+
gestureSourceType: gesture_source_type)
|
136
|
+
end
|
137
|
+
|
138
|
+
end # V84
|
139
|
+
end # Input
|
140
|
+
end # DevTools
|
141
|
+
end # WebDriver
|
142
|
+
end # Selenium
|
@@ -0,0 +1,57 @@
|
|
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 WebDriver
|
23
|
+
class DevTools
|
24
|
+
def inspector
|
25
|
+
@inspector ||= V84::Inspector.new(self)
|
26
|
+
end
|
27
|
+
|
28
|
+
module V84
|
29
|
+
class Inspector
|
30
|
+
EVENTS = {
|
31
|
+
detached: 'detached',
|
32
|
+
target_crashed: 'targetCrashed',
|
33
|
+
target_reloaded_after_crash: 'targetReloadedAfterCrash',
|
34
|
+
}.freeze
|
35
|
+
|
36
|
+
def initialize(devtools)
|
37
|
+
@devtools = devtools
|
38
|
+
end
|
39
|
+
|
40
|
+
def on(event, &block)
|
41
|
+
event = EVENTS[event] if event.is_a?(Symbol)
|
42
|
+
@devtools.callbacks["Inspector.#{event}"] << block
|
43
|
+
end
|
44
|
+
|
45
|
+
def disable
|
46
|
+
@devtools.send_cmd('Inspector.disable')
|
47
|
+
end
|
48
|
+
|
49
|
+
def enable
|
50
|
+
@devtools.send_cmd('Inspector.enable')
|
51
|
+
end
|
52
|
+
|
53
|
+
end # V84
|
54
|
+
end # Inspector
|
55
|
+
end # DevTools
|
56
|
+
end # WebDriver
|
57
|
+
end # Selenium
|
@@ -0,0 +1,61 @@
|
|
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 WebDriver
|
23
|
+
class DevTools
|
24
|
+
def io
|
25
|
+
@io ||= V84::IO.new(self)
|
26
|
+
end
|
27
|
+
|
28
|
+
module V84
|
29
|
+
class IO
|
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["IO.#{event}"] << block
|
38
|
+
end
|
39
|
+
|
40
|
+
def close(handle:)
|
41
|
+
@devtools.send_cmd('IO.close',
|
42
|
+
handle: handle)
|
43
|
+
end
|
44
|
+
|
45
|
+
def read(handle:, offset: nil, size: nil)
|
46
|
+
@devtools.send_cmd('IO.read',
|
47
|
+
handle: handle,
|
48
|
+
offset: offset,
|
49
|
+
size: size)
|
50
|
+
end
|
51
|
+
|
52
|
+
def resolve_blob(object_id:)
|
53
|
+
@devtools.send_cmd('IO.resolveBlob',
|
54
|
+
objectId: object_id)
|
55
|
+
end
|
56
|
+
|
57
|
+
end # V84
|
58
|
+
end # IO
|
59
|
+
end # DevTools
|
60
|
+
end # WebDriver
|
61
|
+
end # Selenium
|