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,55 @@
|
|
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 device_orientation
|
25
|
+
@device_orientation ||= V84::DeviceOrientation.new(self)
|
26
|
+
end
|
27
|
+
|
28
|
+
module V84
|
29
|
+
class DeviceOrientation
|
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["DeviceOrientation.#{event}"] << block
|
38
|
+
end
|
39
|
+
|
40
|
+
def clear_device_orientation_override
|
41
|
+
@devtools.send_cmd('DeviceOrientation.clearDeviceOrientationOverride')
|
42
|
+
end
|
43
|
+
|
44
|
+
def set_device_orientation_override(alpha:, beta:, gamma:)
|
45
|
+
@devtools.send_cmd('DeviceOrientation.setDeviceOrientationOverride',
|
46
|
+
alpha: alpha,
|
47
|
+
beta: beta,
|
48
|
+
gamma: gamma)
|
49
|
+
end
|
50
|
+
|
51
|
+
end # V84
|
52
|
+
end # DeviceOrientation
|
53
|
+
end # DevTools
|
54
|
+
end # WebDriver
|
55
|
+
end # Selenium
|
@@ -0,0 +1,322 @@
|
|
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 dom
|
25
|
+
@dom ||= V84::DOM.new(self)
|
26
|
+
end
|
27
|
+
|
28
|
+
module V84
|
29
|
+
class DOM
|
30
|
+
EVENTS = {
|
31
|
+
attribute_modified: 'attributeModified',
|
32
|
+
attribute_removed: 'attributeRemoved',
|
33
|
+
character_data_modified: 'characterDataModified',
|
34
|
+
child_node_count_updated: 'childNodeCountUpdated',
|
35
|
+
child_node_inserted: 'childNodeInserted',
|
36
|
+
child_node_removed: 'childNodeRemoved',
|
37
|
+
distributed_nodes_updated: 'distributedNodesUpdated',
|
38
|
+
document_updated: 'documentUpdated',
|
39
|
+
inline_style_invalidated: 'inlineStyleInvalidated',
|
40
|
+
pseudo_element_added: 'pseudoElementAdded',
|
41
|
+
pseudo_element_removed: 'pseudoElementRemoved',
|
42
|
+
set_child_nodes: 'setChildNodes',
|
43
|
+
shadow_root_popped: 'shadowRootPopped',
|
44
|
+
shadow_root_pushed: 'shadowRootPushed',
|
45
|
+
}.freeze
|
46
|
+
|
47
|
+
def initialize(devtools)
|
48
|
+
@devtools = devtools
|
49
|
+
end
|
50
|
+
|
51
|
+
def on(event, &block)
|
52
|
+
event = EVENTS[event] if event.is_a?(Symbol)
|
53
|
+
@devtools.callbacks["DOM.#{event}"] << block
|
54
|
+
end
|
55
|
+
|
56
|
+
def collect_class_names_from_subtree(node_id:)
|
57
|
+
@devtools.send_cmd('DOM.collectClassNamesFromSubtree',
|
58
|
+
nodeId: node_id)
|
59
|
+
end
|
60
|
+
|
61
|
+
def copy_to(node_id:, target_node_id:, insert_before_node_id: nil)
|
62
|
+
@devtools.send_cmd('DOM.copyTo',
|
63
|
+
nodeId: node_id,
|
64
|
+
targetNodeId: target_node_id,
|
65
|
+
insertBeforeNodeId: insert_before_node_id)
|
66
|
+
end
|
67
|
+
|
68
|
+
def describe_node(node_id: nil, backend_node_id: nil, object_id: nil, depth: nil, pierce: nil)
|
69
|
+
@devtools.send_cmd('DOM.describeNode',
|
70
|
+
nodeId: node_id,
|
71
|
+
backendNodeId: backend_node_id,
|
72
|
+
objectId: object_id,
|
73
|
+
depth: depth,
|
74
|
+
pierce: pierce)
|
75
|
+
end
|
76
|
+
|
77
|
+
def scroll_into_view_if_needed(node_id: nil, backend_node_id: nil, object_id: nil, rect: nil)
|
78
|
+
@devtools.send_cmd('DOM.scrollIntoViewIfNeeded',
|
79
|
+
nodeId: node_id,
|
80
|
+
backendNodeId: backend_node_id,
|
81
|
+
objectId: object_id,
|
82
|
+
rect: rect)
|
83
|
+
end
|
84
|
+
|
85
|
+
def disable
|
86
|
+
@devtools.send_cmd('DOM.disable')
|
87
|
+
end
|
88
|
+
|
89
|
+
def discard_search_results(search_id:)
|
90
|
+
@devtools.send_cmd('DOM.discardSearchResults',
|
91
|
+
searchId: search_id)
|
92
|
+
end
|
93
|
+
|
94
|
+
def enable
|
95
|
+
@devtools.send_cmd('DOM.enable')
|
96
|
+
end
|
97
|
+
|
98
|
+
def focus(node_id: nil, backend_node_id: nil, object_id: nil)
|
99
|
+
@devtools.send_cmd('DOM.focus',
|
100
|
+
nodeId: node_id,
|
101
|
+
backendNodeId: backend_node_id,
|
102
|
+
objectId: object_id)
|
103
|
+
end
|
104
|
+
|
105
|
+
def get_attributes(node_id:)
|
106
|
+
@devtools.send_cmd('DOM.getAttributes',
|
107
|
+
nodeId: node_id)
|
108
|
+
end
|
109
|
+
|
110
|
+
def get_box_model(node_id: nil, backend_node_id: nil, object_id: nil)
|
111
|
+
@devtools.send_cmd('DOM.getBoxModel',
|
112
|
+
nodeId: node_id,
|
113
|
+
backendNodeId: backend_node_id,
|
114
|
+
objectId: object_id)
|
115
|
+
end
|
116
|
+
|
117
|
+
def get_content_quads(node_id: nil, backend_node_id: nil, object_id: nil)
|
118
|
+
@devtools.send_cmd('DOM.getContentQuads',
|
119
|
+
nodeId: node_id,
|
120
|
+
backendNodeId: backend_node_id,
|
121
|
+
objectId: object_id)
|
122
|
+
end
|
123
|
+
|
124
|
+
def get_document(depth: nil, pierce: nil)
|
125
|
+
@devtools.send_cmd('DOM.getDocument',
|
126
|
+
depth: depth,
|
127
|
+
pierce: pierce)
|
128
|
+
end
|
129
|
+
|
130
|
+
def get_flattened_document(depth: nil, pierce: nil)
|
131
|
+
@devtools.send_cmd('DOM.getFlattenedDocument',
|
132
|
+
depth: depth,
|
133
|
+
pierce: pierce)
|
134
|
+
end
|
135
|
+
|
136
|
+
def get_node_for_location(x:, y:, include_user_agent_shadow_dom: nil, ignore_pointer_events_none: nil)
|
137
|
+
@devtools.send_cmd('DOM.getNodeForLocation',
|
138
|
+
x: x,
|
139
|
+
y: y,
|
140
|
+
includeUserAgentShadowDOM: include_user_agent_shadow_dom,
|
141
|
+
ignorePointerEventsNone: ignore_pointer_events_none)
|
142
|
+
end
|
143
|
+
|
144
|
+
def get_outer_html(node_id: nil, backend_node_id: nil, object_id: nil)
|
145
|
+
@devtools.send_cmd('DOM.getOuterHTML',
|
146
|
+
nodeId: node_id,
|
147
|
+
backendNodeId: backend_node_id,
|
148
|
+
objectId: object_id)
|
149
|
+
end
|
150
|
+
|
151
|
+
def get_relayout_boundary(node_id:)
|
152
|
+
@devtools.send_cmd('DOM.getRelayoutBoundary',
|
153
|
+
nodeId: node_id)
|
154
|
+
end
|
155
|
+
|
156
|
+
def get_search_results(search_id:, from_index:, to_index:)
|
157
|
+
@devtools.send_cmd('DOM.getSearchResults',
|
158
|
+
searchId: search_id,
|
159
|
+
fromIndex: from_index,
|
160
|
+
toIndex: to_index)
|
161
|
+
end
|
162
|
+
|
163
|
+
def hide_highlight
|
164
|
+
@devtools.send_cmd('DOM.hideHighlight')
|
165
|
+
end
|
166
|
+
|
167
|
+
def highlight_node
|
168
|
+
@devtools.send_cmd('DOM.highlightNode')
|
169
|
+
end
|
170
|
+
|
171
|
+
def highlight_rect
|
172
|
+
@devtools.send_cmd('DOM.highlightRect')
|
173
|
+
end
|
174
|
+
|
175
|
+
def mark_undoable_state
|
176
|
+
@devtools.send_cmd('DOM.markUndoableState')
|
177
|
+
end
|
178
|
+
|
179
|
+
def move_to(node_id:, target_node_id:, insert_before_node_id: nil)
|
180
|
+
@devtools.send_cmd('DOM.moveTo',
|
181
|
+
nodeId: node_id,
|
182
|
+
targetNodeId: target_node_id,
|
183
|
+
insertBeforeNodeId: insert_before_node_id)
|
184
|
+
end
|
185
|
+
|
186
|
+
def perform_search(query:, include_user_agent_shadow_dom: nil)
|
187
|
+
@devtools.send_cmd('DOM.performSearch',
|
188
|
+
query: query,
|
189
|
+
includeUserAgentShadowDOM: include_user_agent_shadow_dom)
|
190
|
+
end
|
191
|
+
|
192
|
+
def push_node_by_path_to_frontend(path:)
|
193
|
+
@devtools.send_cmd('DOM.pushNodeByPathToFrontend',
|
194
|
+
path: path)
|
195
|
+
end
|
196
|
+
|
197
|
+
def push_nodes_by_backend_ids_to_frontend(backend_node_ids:)
|
198
|
+
@devtools.send_cmd('DOM.pushNodesByBackendIdsToFrontend',
|
199
|
+
backendNodeIds: backend_node_ids)
|
200
|
+
end
|
201
|
+
|
202
|
+
def query_selector(node_id:, selector:)
|
203
|
+
@devtools.send_cmd('DOM.querySelector',
|
204
|
+
nodeId: node_id,
|
205
|
+
selector: selector)
|
206
|
+
end
|
207
|
+
|
208
|
+
def query_selector_all(node_id:, selector:)
|
209
|
+
@devtools.send_cmd('DOM.querySelectorAll',
|
210
|
+
nodeId: node_id,
|
211
|
+
selector: selector)
|
212
|
+
end
|
213
|
+
|
214
|
+
def redo
|
215
|
+
@devtools.send_cmd('DOM.redo')
|
216
|
+
end
|
217
|
+
|
218
|
+
def remove_attribute(node_id:, name:)
|
219
|
+
@devtools.send_cmd('DOM.removeAttribute',
|
220
|
+
nodeId: node_id,
|
221
|
+
name: name)
|
222
|
+
end
|
223
|
+
|
224
|
+
def remove_node(node_id:)
|
225
|
+
@devtools.send_cmd('DOM.removeNode',
|
226
|
+
nodeId: node_id)
|
227
|
+
end
|
228
|
+
|
229
|
+
def request_child_nodes(node_id:, depth: nil, pierce: nil)
|
230
|
+
@devtools.send_cmd('DOM.requestChildNodes',
|
231
|
+
nodeId: node_id,
|
232
|
+
depth: depth,
|
233
|
+
pierce: pierce)
|
234
|
+
end
|
235
|
+
|
236
|
+
def request_node(object_id:)
|
237
|
+
@devtools.send_cmd('DOM.requestNode',
|
238
|
+
objectId: object_id)
|
239
|
+
end
|
240
|
+
|
241
|
+
def resolve_node(node_id: nil, backend_node_id: nil, object_group: nil, execution_context_id: nil)
|
242
|
+
@devtools.send_cmd('DOM.resolveNode',
|
243
|
+
nodeId: node_id,
|
244
|
+
backendNodeId: backend_node_id,
|
245
|
+
objectGroup: object_group,
|
246
|
+
executionContextId: execution_context_id)
|
247
|
+
end
|
248
|
+
|
249
|
+
def set_attribute_value(node_id:, name:, value:)
|
250
|
+
@devtools.send_cmd('DOM.setAttributeValue',
|
251
|
+
nodeId: node_id,
|
252
|
+
name: name,
|
253
|
+
value: value)
|
254
|
+
end
|
255
|
+
|
256
|
+
def set_attributes_as_text(node_id:, text:, name: nil)
|
257
|
+
@devtools.send_cmd('DOM.setAttributesAsText',
|
258
|
+
nodeId: node_id,
|
259
|
+
text: text,
|
260
|
+
name: name)
|
261
|
+
end
|
262
|
+
|
263
|
+
def set_file_input_files(files:, node_id: nil, backend_node_id: nil, object_id: nil)
|
264
|
+
@devtools.send_cmd('DOM.setFileInputFiles',
|
265
|
+
files: files,
|
266
|
+
nodeId: node_id,
|
267
|
+
backendNodeId: backend_node_id,
|
268
|
+
objectId: object_id)
|
269
|
+
end
|
270
|
+
|
271
|
+
def set_node_stack_traces_enabled(enable:)
|
272
|
+
@devtools.send_cmd('DOM.setNodeStackTracesEnabled',
|
273
|
+
enable: enable)
|
274
|
+
end
|
275
|
+
|
276
|
+
def get_node_stack_traces(node_id:)
|
277
|
+
@devtools.send_cmd('DOM.getNodeStackTraces',
|
278
|
+
nodeId: node_id)
|
279
|
+
end
|
280
|
+
|
281
|
+
def get_file_info(object_id:)
|
282
|
+
@devtools.send_cmd('DOM.getFileInfo',
|
283
|
+
objectId: object_id)
|
284
|
+
end
|
285
|
+
|
286
|
+
def set_inspected_node(node_id:)
|
287
|
+
@devtools.send_cmd('DOM.setInspectedNode',
|
288
|
+
nodeId: node_id)
|
289
|
+
end
|
290
|
+
|
291
|
+
def set_node_name(node_id:, name:)
|
292
|
+
@devtools.send_cmd('DOM.setNodeName',
|
293
|
+
nodeId: node_id,
|
294
|
+
name: name)
|
295
|
+
end
|
296
|
+
|
297
|
+
def set_node_value(node_id:, value:)
|
298
|
+
@devtools.send_cmd('DOM.setNodeValue',
|
299
|
+
nodeId: node_id,
|
300
|
+
value: value)
|
301
|
+
end
|
302
|
+
|
303
|
+
def set_outer_html(node_id:, outer_html:)
|
304
|
+
@devtools.send_cmd('DOM.setOuterHTML',
|
305
|
+
nodeId: node_id,
|
306
|
+
outerHTML: outer_html)
|
307
|
+
end
|
308
|
+
|
309
|
+
def undo
|
310
|
+
@devtools.send_cmd('DOM.undo')
|
311
|
+
end
|
312
|
+
|
313
|
+
def get_frame_owner(frame_id:)
|
314
|
+
@devtools.send_cmd('DOM.getFrameOwner',
|
315
|
+
frameId: frame_id)
|
316
|
+
end
|
317
|
+
|
318
|
+
end # V84
|
319
|
+
end # DOM
|
320
|
+
end # DevTools
|
321
|
+
end # WebDriver
|
322
|
+
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 WebDriver
|
23
|
+
class DevTools
|
24
|
+
def dom_debugger
|
25
|
+
@dom_debugger ||= V84::DOMDebugger.new(self)
|
26
|
+
end
|
27
|
+
|
28
|
+
module V84
|
29
|
+
class DOMDebugger
|
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["DOMDebugger.#{event}"] << block
|
38
|
+
end
|
39
|
+
|
40
|
+
def get_event_listeners(object_id:, depth: nil, pierce: nil)
|
41
|
+
@devtools.send_cmd('DOMDebugger.getEventListeners',
|
42
|
+
objectId: object_id,
|
43
|
+
depth: depth,
|
44
|
+
pierce: pierce)
|
45
|
+
end
|
46
|
+
|
47
|
+
def remove_dom_breakpoint(node_id:, type:)
|
48
|
+
@devtools.send_cmd('DOMDebugger.removeDOMBreakpoint',
|
49
|
+
nodeId: node_id,
|
50
|
+
type: type)
|
51
|
+
end
|
52
|
+
|
53
|
+
def remove_event_listener_breakpoint(event_name:, target_name: nil)
|
54
|
+
@devtools.send_cmd('DOMDebugger.removeEventListenerBreakpoint',
|
55
|
+
eventName: event_name,
|
56
|
+
targetName: target_name)
|
57
|
+
end
|
58
|
+
|
59
|
+
def remove_instrumentation_breakpoint(event_name:)
|
60
|
+
@devtools.send_cmd('DOMDebugger.removeInstrumentationBreakpoint',
|
61
|
+
eventName: event_name)
|
62
|
+
end
|
63
|
+
|
64
|
+
def remove_xhr_breakpoint(url:)
|
65
|
+
@devtools.send_cmd('DOMDebugger.removeXHRBreakpoint',
|
66
|
+
url: url)
|
67
|
+
end
|
68
|
+
|
69
|
+
def set_dom_breakpoint(node_id:, type:)
|
70
|
+
@devtools.send_cmd('DOMDebugger.setDOMBreakpoint',
|
71
|
+
nodeId: node_id,
|
72
|
+
type: type)
|
73
|
+
end
|
74
|
+
|
75
|
+
def set_event_listener_breakpoint(event_name:, target_name: nil)
|
76
|
+
@devtools.send_cmd('DOMDebugger.setEventListenerBreakpoint',
|
77
|
+
eventName: event_name,
|
78
|
+
targetName: target_name)
|
79
|
+
end
|
80
|
+
|
81
|
+
def set_instrumentation_breakpoint(event_name:)
|
82
|
+
@devtools.send_cmd('DOMDebugger.setInstrumentationBreakpoint',
|
83
|
+
eventName: event_name)
|
84
|
+
end
|
85
|
+
|
86
|
+
def set_xhr_breakpoint(url:)
|
87
|
+
@devtools.send_cmd('DOMDebugger.setXHRBreakpoint',
|
88
|
+
url: url)
|
89
|
+
end
|
90
|
+
|
91
|
+
end # V84
|
92
|
+
end # DOMDebugger
|
93
|
+
end # DevTools
|
94
|
+
end # WebDriver
|
95
|
+
end # Selenium
|