selenium-devtools 0.97.0 → 0.99.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/selenium/devtools/README.md +9 -2
- data/lib/selenium/devtools/{v95 → v98}/accessibility.rb +18 -2
- data/lib/selenium/devtools/{v95 → v98}/animation.rb +2 -2
- data/lib/selenium/devtools/{v95 → v98}/audits.rb +2 -2
- data/lib/selenium/devtools/{v95 → v98}/background_service.rb +2 -2
- data/lib/selenium/devtools/{v95 → v98}/browser.rb +2 -2
- data/lib/selenium/devtools/{v95 → v98}/cache_storage.rb +2 -2
- data/lib/selenium/devtools/{v95 → v98}/cast.rb +7 -2
- data/lib/selenium/devtools/{v95 → v98}/console.rb +2 -2
- data/lib/selenium/devtools/{v95 → v98}/css.rb +2 -2
- data/lib/selenium/devtools/{v95 → v98}/database.rb +2 -2
- data/lib/selenium/devtools/{v95 → v98}/debugger.rb +2 -2
- data/lib/selenium/devtools/{v95 → v98}/device_orientation.rb +2 -2
- data/lib/selenium/devtools/{v95 → v98}/dom.rb +2 -2
- data/lib/selenium/devtools/{v95 → v98}/dom_debugger.rb +2 -2
- data/lib/selenium/devtools/{v95 → v98}/dom_snapshot.rb +2 -2
- data/lib/selenium/devtools/{v95 → v98}/dom_storage.rb +2 -2
- data/lib/selenium/devtools/{v95 → v98}/emulation.rb +2 -2
- data/lib/selenium/devtools/v98/event_breakpoints.rb +48 -0
- data/lib/selenium/devtools/{v95 → v98}/fetch.rb +2 -2
- data/lib/selenium/devtools/{v95 → v98}/headless_experimental.rb +2 -2
- data/lib/selenium/devtools/{v95 → v98}/heap_profiler.rb +2 -2
- data/lib/selenium/devtools/{v95 → v98}/indexed_db.rb +2 -2
- data/lib/selenium/devtools/{v95 → v98}/input.rb +2 -2
- data/lib/selenium/devtools/{v95 → v98}/inspector.rb +2 -2
- data/lib/selenium/devtools/{v95 → v98}/io.rb +2 -2
- data/lib/selenium/devtools/{v95 → v98}/layer_tree.rb +2 -2
- data/lib/selenium/devtools/{v95 → v98}/log.rb +2 -2
- data/lib/selenium/devtools/{v95 → v98}/media.rb +2 -2
- data/lib/selenium/devtools/{v95 → v98}/memory.rb +2 -2
- data/lib/selenium/devtools/{v95 → v98}/network.rb +6 -4
- data/lib/selenium/devtools/{v95 → v98}/overlay.rb +7 -2
- data/lib/selenium/devtools/{v95 → v98}/page.rb +7 -7
- data/lib/selenium/devtools/{v95 → v98}/performance.rb +2 -2
- data/lib/selenium/devtools/{v95 → v98}/performance_timeline.rb +2 -2
- data/lib/selenium/devtools/{v95 → v98}/profiler.rb +2 -2
- data/lib/selenium/devtools/{v95 → v98}/runtime.rb +2 -2
- data/lib/selenium/devtools/{v95 → v98}/schema.rb +2 -2
- data/lib/selenium/devtools/{v95 → v98}/security.rb +2 -2
- data/lib/selenium/devtools/{v95 → v98}/service_worker.rb +2 -2
- data/lib/selenium/devtools/{v95 → v98}/storage.rb +2 -2
- data/lib/selenium/devtools/{v95 → v98}/system_info.rb +2 -2
- data/lib/selenium/devtools/{v95 → v98}/target.rb +5 -4
- data/lib/selenium/devtools/{v95 → v98}/tethering.rb +2 -2
- data/lib/selenium/devtools/{v95 → v98}/tracing.rb +2 -2
- data/lib/selenium/devtools/{v95 → v98}/web_audio.rb +2 -2
- data/lib/selenium/devtools/{v95 → v98}/web_authn.rb +2 -2
- data/lib/selenium/devtools/v98.rb +1 -0
- data/lib/selenium/devtools/v99/accessibility.rb +92 -0
- data/lib/selenium/devtools/v99/animation.rb +94 -0
- data/lib/selenium/devtools/v99/audits.rb +62 -0
- data/lib/selenium/devtools/{v95/application_cache.rb → v99/background_service.rb} +20 -17
- data/lib/selenium/devtools/v99/browser.rb +135 -0
- data/lib/selenium/devtools/v99/cache_storage.rb +69 -0
- data/lib/selenium/devtools/v99/cast.rb +71 -0
- data/lib/selenium/devtools/v99/console.rb +53 -0
- data/lib/selenium/devtools/v99/css.rb +182 -0
- data/lib/selenium/devtools/v99/database.rb +60 -0
- data/lib/selenium/devtools/v99/debugger.rb +220 -0
- data/lib/selenium/devtools/v99/device_orientation.rb +49 -0
- data/lib/selenium/devtools/v99/dom.rb +334 -0
- data/lib/selenium/devtools/v99/dom_debugger.rb +94 -0
- data/lib/selenium/devtools/v99/dom_snapshot.rb +63 -0
- data/lib/selenium/devtools/v99/dom_storage.rb +75 -0
- data/lib/selenium/devtools/v99/emulation.rb +197 -0
- data/lib/selenium/devtools/v99/event_breakpoints.rb +48 -0
- data/lib/selenium/devtools/v99/fetch.rb +103 -0
- data/lib/selenium/devtools/v99/headless_experimental.rb +57 -0
- data/lib/selenium/devtools/v99/heap_profiler.rb +105 -0
- data/lib/selenium/devtools/v99/indexed_db.rb +96 -0
- data/lib/selenium/devtools/v99/input.rb +168 -0
- data/lib/selenium/devtools/v99/inspector.rb +51 -0
- data/lib/selenium/devtools/v99/io.rb +55 -0
- data/lib/selenium/devtools/v99/layer_tree.rb +91 -0
- data/lib/selenium/devtools/v99/log.rb +62 -0
- data/lib/selenium/devtools/v99/media.rb +53 -0
- data/lib/selenium/devtools/v99/memory.rb +82 -0
- data/lib/selenium/devtools/v99/network.rb +264 -0
- data/lib/selenium/devtools/v99/overlay.rb +202 -0
- data/lib/selenium/devtools/v99/page.rb +394 -0
- data/lib/selenium/devtools/v99/performance.rb +59 -0
- data/lib/selenium/devtools/v99/performance_timeline.rb +46 -0
- data/lib/selenium/devtools/v99/profiler.rb +95 -0
- data/lib/selenium/devtools/v99/runtime.rb +199 -0
- data/lib/selenium/devtools/v99/schema.rb +42 -0
- data/lib/selenium/devtools/v99/security.rb +67 -0
- data/lib/selenium/devtools/v99/service_worker.rb +112 -0
- data/lib/selenium/devtools/v99/storage.rb +118 -0
- data/lib/selenium/devtools/v99/system_info.rb +46 -0
- data/lib/selenium/devtools/v99/target.rb +146 -0
- data/lib/selenium/devtools/v99/tethering.rb +51 -0
- data/lib/selenium/devtools/v99/tracing.rb +75 -0
- data/lib/selenium/devtools/v99/web_audio.rb +66 -0
- data/lib/selenium/devtools/v99/web_authn.rb +96 -0
- data/lib/selenium/devtools/v99.rb +1 -0
- data/lib/selenium/devtools/version.rb +1 -1
- metadata +96 -49
- data/lib/selenium/devtools/v95.rb +0 -1
@@ -0,0 +1,135 @@
|
|
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 V99
|
24
|
+
class Browser
|
25
|
+
EVENTS = {
|
26
|
+
download_will_begin: 'downloadWillBegin',
|
27
|
+
download_progress: 'downloadProgress',
|
28
|
+
}.freeze
|
29
|
+
|
30
|
+
def initialize(devtools)
|
31
|
+
@devtools = devtools
|
32
|
+
end
|
33
|
+
|
34
|
+
def on(event, &block)
|
35
|
+
event = EVENTS[event] if event.is_a?(Symbol)
|
36
|
+
@devtools.callbacks["Browser.#{event}"] << block
|
37
|
+
end
|
38
|
+
|
39
|
+
def set_permission(permission:, setting:, origin: nil, browser_context_id: nil)
|
40
|
+
@devtools.send_cmd('Browser.setPermission',
|
41
|
+
permission: permission,
|
42
|
+
setting: setting,
|
43
|
+
origin: origin,
|
44
|
+
browserContextId: browser_context_id)
|
45
|
+
end
|
46
|
+
|
47
|
+
def grant_permissions(permissions:, origin: nil, browser_context_id: nil)
|
48
|
+
@devtools.send_cmd('Browser.grantPermissions',
|
49
|
+
permissions: permissions,
|
50
|
+
origin: origin,
|
51
|
+
browserContextId: browser_context_id)
|
52
|
+
end
|
53
|
+
|
54
|
+
def reset_permissions(browser_context_id: nil)
|
55
|
+
@devtools.send_cmd('Browser.resetPermissions',
|
56
|
+
browserContextId: browser_context_id)
|
57
|
+
end
|
58
|
+
|
59
|
+
def set_download_behavior(behavior:, browser_context_id: nil, download_path: nil, events_enabled: nil)
|
60
|
+
@devtools.send_cmd('Browser.setDownloadBehavior',
|
61
|
+
behavior: behavior,
|
62
|
+
browserContextId: browser_context_id,
|
63
|
+
downloadPath: download_path,
|
64
|
+
eventsEnabled: events_enabled)
|
65
|
+
end
|
66
|
+
|
67
|
+
def cancel_download(guid:, browser_context_id: nil)
|
68
|
+
@devtools.send_cmd('Browser.cancelDownload',
|
69
|
+
guid: guid,
|
70
|
+
browserContextId: browser_context_id)
|
71
|
+
end
|
72
|
+
|
73
|
+
def close
|
74
|
+
@devtools.send_cmd('Browser.close')
|
75
|
+
end
|
76
|
+
|
77
|
+
def crash
|
78
|
+
@devtools.send_cmd('Browser.crash')
|
79
|
+
end
|
80
|
+
|
81
|
+
def crash_gpu_process
|
82
|
+
@devtools.send_cmd('Browser.crashGpuProcess')
|
83
|
+
end
|
84
|
+
|
85
|
+
def get_version
|
86
|
+
@devtools.send_cmd('Browser.getVersion')
|
87
|
+
end
|
88
|
+
|
89
|
+
def get_browser_command_line
|
90
|
+
@devtools.send_cmd('Browser.getBrowserCommandLine')
|
91
|
+
end
|
92
|
+
|
93
|
+
def get_histograms(query: nil, delta: nil)
|
94
|
+
@devtools.send_cmd('Browser.getHistograms',
|
95
|
+
query: query,
|
96
|
+
delta: delta)
|
97
|
+
end
|
98
|
+
|
99
|
+
def get_histogram(name:, delta: nil)
|
100
|
+
@devtools.send_cmd('Browser.getHistogram',
|
101
|
+
name: name,
|
102
|
+
delta: delta)
|
103
|
+
end
|
104
|
+
|
105
|
+
def get_window_bounds(window_id:)
|
106
|
+
@devtools.send_cmd('Browser.getWindowBounds',
|
107
|
+
windowId: window_id)
|
108
|
+
end
|
109
|
+
|
110
|
+
def get_window_for_target(target_id: nil)
|
111
|
+
@devtools.send_cmd('Browser.getWindowForTarget',
|
112
|
+
targetId: target_id)
|
113
|
+
end
|
114
|
+
|
115
|
+
def set_window_bounds(window_id:, bounds:)
|
116
|
+
@devtools.send_cmd('Browser.setWindowBounds',
|
117
|
+
windowId: window_id,
|
118
|
+
bounds: bounds)
|
119
|
+
end
|
120
|
+
|
121
|
+
def set_dock_tile(badge_label: nil, image: nil)
|
122
|
+
@devtools.send_cmd('Browser.setDockTile',
|
123
|
+
badgeLabel: badge_label,
|
124
|
+
image: image)
|
125
|
+
end
|
126
|
+
|
127
|
+
def execute_browser_command(command_id:)
|
128
|
+
@devtools.send_cmd('Browser.executeBrowserCommand',
|
129
|
+
commandId: command_id)
|
130
|
+
end
|
131
|
+
|
132
|
+
end # Browser
|
133
|
+
end # V99
|
134
|
+
end # DevTools
|
135
|
+
end # Selenium
|
@@ -0,0 +1,69 @@
|
|
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 V99
|
24
|
+
class CacheStorage
|
25
|
+
|
26
|
+
def initialize(devtools)
|
27
|
+
@devtools = devtools
|
28
|
+
end
|
29
|
+
|
30
|
+
def on(event, &block)
|
31
|
+
event = EVENTS[event] if event.is_a?(Symbol)
|
32
|
+
@devtools.callbacks["CacheStorage.#{event}"] << block
|
33
|
+
end
|
34
|
+
|
35
|
+
def delete_cache(cache_id:)
|
36
|
+
@devtools.send_cmd('CacheStorage.deleteCache',
|
37
|
+
cacheId: cache_id)
|
38
|
+
end
|
39
|
+
|
40
|
+
def delete_entry(cache_id:, request:)
|
41
|
+
@devtools.send_cmd('CacheStorage.deleteEntry',
|
42
|
+
cacheId: cache_id,
|
43
|
+
request: request)
|
44
|
+
end
|
45
|
+
|
46
|
+
def request_cache_names(security_origin:)
|
47
|
+
@devtools.send_cmd('CacheStorage.requestCacheNames',
|
48
|
+
securityOrigin: security_origin)
|
49
|
+
end
|
50
|
+
|
51
|
+
def request_cached_response(cache_id:, request_url:, request_headers:)
|
52
|
+
@devtools.send_cmd('CacheStorage.requestCachedResponse',
|
53
|
+
cacheId: cache_id,
|
54
|
+
requestURL: request_url,
|
55
|
+
requestHeaders: request_headers)
|
56
|
+
end
|
57
|
+
|
58
|
+
def request_entries(cache_id:, skip_count: nil, page_size: nil, path_filter: nil)
|
59
|
+
@devtools.send_cmd('CacheStorage.requestEntries',
|
60
|
+
cacheId: cache_id,
|
61
|
+
skipCount: skip_count,
|
62
|
+
pageSize: page_size,
|
63
|
+
pathFilter: path_filter)
|
64
|
+
end
|
65
|
+
|
66
|
+
end # CacheStorage
|
67
|
+
end # V99
|
68
|
+
end # DevTools
|
69
|
+
end # Selenium
|
@@ -0,0 +1,71 @@
|
|
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 V99
|
24
|
+
class Cast
|
25
|
+
EVENTS = {
|
26
|
+
sinks_updated: 'sinksUpdated',
|
27
|
+
issue_updated: 'issueUpdated',
|
28
|
+
}.freeze
|
29
|
+
|
30
|
+
def initialize(devtools)
|
31
|
+
@devtools = devtools
|
32
|
+
end
|
33
|
+
|
34
|
+
def on(event, &block)
|
35
|
+
event = EVENTS[event] if event.is_a?(Symbol)
|
36
|
+
@devtools.callbacks["Cast.#{event}"] << block
|
37
|
+
end
|
38
|
+
|
39
|
+
def enable(presentation_url: nil)
|
40
|
+
@devtools.send_cmd('Cast.enable',
|
41
|
+
presentationUrl: presentation_url)
|
42
|
+
end
|
43
|
+
|
44
|
+
def disable
|
45
|
+
@devtools.send_cmd('Cast.disable')
|
46
|
+
end
|
47
|
+
|
48
|
+
def set_sink_to_use(sink_name:)
|
49
|
+
@devtools.send_cmd('Cast.setSinkToUse',
|
50
|
+
sinkName: sink_name)
|
51
|
+
end
|
52
|
+
|
53
|
+
def start_desktop_mirroring(sink_name:)
|
54
|
+
@devtools.send_cmd('Cast.startDesktopMirroring',
|
55
|
+
sinkName: sink_name)
|
56
|
+
end
|
57
|
+
|
58
|
+
def start_tab_mirroring(sink_name:)
|
59
|
+
@devtools.send_cmd('Cast.startTabMirroring',
|
60
|
+
sinkName: sink_name)
|
61
|
+
end
|
62
|
+
|
63
|
+
def stop_casting(sink_name:)
|
64
|
+
@devtools.send_cmd('Cast.stopCasting',
|
65
|
+
sinkName: sink_name)
|
66
|
+
end
|
67
|
+
|
68
|
+
end # Cast
|
69
|
+
end # V99
|
70
|
+
end # DevTools
|
71
|
+
end # Selenium
|
@@ -0,0 +1,53 @@
|
|
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 V99
|
24
|
+
class Console
|
25
|
+
EVENTS = {
|
26
|
+
message_added: 'messageAdded',
|
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["Console.#{event}"] << block
|
36
|
+
end
|
37
|
+
|
38
|
+
def clear_messages
|
39
|
+
@devtools.send_cmd('Console.clearMessages')
|
40
|
+
end
|
41
|
+
|
42
|
+
def disable
|
43
|
+
@devtools.send_cmd('Console.disable')
|
44
|
+
end
|
45
|
+
|
46
|
+
def enable
|
47
|
+
@devtools.send_cmd('Console.enable')
|
48
|
+
end
|
49
|
+
|
50
|
+
end # Console
|
51
|
+
end # V99
|
52
|
+
end # DevTools
|
53
|
+
end # Selenium
|
@@ -0,0 +1,182 @@
|
|
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 V99
|
24
|
+
class CSS
|
25
|
+
EVENTS = {
|
26
|
+
fonts_updated: 'fontsUpdated',
|
27
|
+
media_query_result_changed: 'mediaQueryResultChanged',
|
28
|
+
style_sheet_added: 'styleSheetAdded',
|
29
|
+
style_sheet_changed: 'styleSheetChanged',
|
30
|
+
style_sheet_removed: 'styleSheetRemoved',
|
31
|
+
}.freeze
|
32
|
+
|
33
|
+
def initialize(devtools)
|
34
|
+
@devtools = devtools
|
35
|
+
end
|
36
|
+
|
37
|
+
def on(event, &block)
|
38
|
+
event = EVENTS[event] if event.is_a?(Symbol)
|
39
|
+
@devtools.callbacks["CSS.#{event}"] << block
|
40
|
+
end
|
41
|
+
|
42
|
+
def add_rule(style_sheet_id:, rule_text:, location:)
|
43
|
+
@devtools.send_cmd('CSS.addRule',
|
44
|
+
styleSheetId: style_sheet_id,
|
45
|
+
ruleText: rule_text,
|
46
|
+
location: location)
|
47
|
+
end
|
48
|
+
|
49
|
+
def collect_class_names(style_sheet_id:)
|
50
|
+
@devtools.send_cmd('CSS.collectClassNames',
|
51
|
+
styleSheetId: style_sheet_id)
|
52
|
+
end
|
53
|
+
|
54
|
+
def create_style_sheet(frame_id:)
|
55
|
+
@devtools.send_cmd('CSS.createStyleSheet',
|
56
|
+
frameId: frame_id)
|
57
|
+
end
|
58
|
+
|
59
|
+
def disable
|
60
|
+
@devtools.send_cmd('CSS.disable')
|
61
|
+
end
|
62
|
+
|
63
|
+
def enable
|
64
|
+
@devtools.send_cmd('CSS.enable')
|
65
|
+
end
|
66
|
+
|
67
|
+
def force_pseudo_state(node_id:, forced_pseudo_classes:)
|
68
|
+
@devtools.send_cmd('CSS.forcePseudoState',
|
69
|
+
nodeId: node_id,
|
70
|
+
forcedPseudoClasses: forced_pseudo_classes)
|
71
|
+
end
|
72
|
+
|
73
|
+
def get_background_colors(node_id:)
|
74
|
+
@devtools.send_cmd('CSS.getBackgroundColors',
|
75
|
+
nodeId: node_id)
|
76
|
+
end
|
77
|
+
|
78
|
+
def get_computed_style_for_node(node_id:)
|
79
|
+
@devtools.send_cmd('CSS.getComputedStyleForNode',
|
80
|
+
nodeId: node_id)
|
81
|
+
end
|
82
|
+
|
83
|
+
def get_inline_styles_for_node(node_id:)
|
84
|
+
@devtools.send_cmd('CSS.getInlineStylesForNode',
|
85
|
+
nodeId: node_id)
|
86
|
+
end
|
87
|
+
|
88
|
+
def get_matched_styles_for_node(node_id:)
|
89
|
+
@devtools.send_cmd('CSS.getMatchedStylesForNode',
|
90
|
+
nodeId: node_id)
|
91
|
+
end
|
92
|
+
|
93
|
+
def get_media_queries
|
94
|
+
@devtools.send_cmd('CSS.getMediaQueries')
|
95
|
+
end
|
96
|
+
|
97
|
+
def get_platform_fonts_for_node(node_id:)
|
98
|
+
@devtools.send_cmd('CSS.getPlatformFontsForNode',
|
99
|
+
nodeId: node_id)
|
100
|
+
end
|
101
|
+
|
102
|
+
def get_style_sheet_text(style_sheet_id:)
|
103
|
+
@devtools.send_cmd('CSS.getStyleSheetText',
|
104
|
+
styleSheetId: style_sheet_id)
|
105
|
+
end
|
106
|
+
|
107
|
+
def track_computed_style_updates(properties_to_track:)
|
108
|
+
@devtools.send_cmd('CSS.trackComputedStyleUpdates',
|
109
|
+
propertiesToTrack: properties_to_track)
|
110
|
+
end
|
111
|
+
|
112
|
+
def take_computed_style_updates
|
113
|
+
@devtools.send_cmd('CSS.takeComputedStyleUpdates')
|
114
|
+
end
|
115
|
+
|
116
|
+
def set_effective_property_value_for_node(node_id:, property_name:, value:)
|
117
|
+
@devtools.send_cmd('CSS.setEffectivePropertyValueForNode',
|
118
|
+
nodeId: node_id,
|
119
|
+
propertyName: property_name,
|
120
|
+
value: value)
|
121
|
+
end
|
122
|
+
|
123
|
+
def set_keyframe_key(style_sheet_id:, range:, key_text:)
|
124
|
+
@devtools.send_cmd('CSS.setKeyframeKey',
|
125
|
+
styleSheetId: style_sheet_id,
|
126
|
+
range: range,
|
127
|
+
keyText: key_text)
|
128
|
+
end
|
129
|
+
|
130
|
+
def set_media_text(style_sheet_id:, range:, text:)
|
131
|
+
@devtools.send_cmd('CSS.setMediaText',
|
132
|
+
styleSheetId: style_sheet_id,
|
133
|
+
range: range,
|
134
|
+
text: text)
|
135
|
+
end
|
136
|
+
|
137
|
+
def set_container_query_text(style_sheet_id:, range:, text:)
|
138
|
+
@devtools.send_cmd('CSS.setContainerQueryText',
|
139
|
+
styleSheetId: style_sheet_id,
|
140
|
+
range: range,
|
141
|
+
text: text)
|
142
|
+
end
|
143
|
+
|
144
|
+
def set_rule_selector(style_sheet_id:, range:, selector:)
|
145
|
+
@devtools.send_cmd('CSS.setRuleSelector',
|
146
|
+
styleSheetId: style_sheet_id,
|
147
|
+
range: range,
|
148
|
+
selector: selector)
|
149
|
+
end
|
150
|
+
|
151
|
+
def set_style_sheet_text(style_sheet_id:, text:)
|
152
|
+
@devtools.send_cmd('CSS.setStyleSheetText',
|
153
|
+
styleSheetId: style_sheet_id,
|
154
|
+
text: text)
|
155
|
+
end
|
156
|
+
|
157
|
+
def set_style_texts(edits:)
|
158
|
+
@devtools.send_cmd('CSS.setStyleTexts',
|
159
|
+
edits: edits)
|
160
|
+
end
|
161
|
+
|
162
|
+
def start_rule_usage_tracking
|
163
|
+
@devtools.send_cmd('CSS.startRuleUsageTracking')
|
164
|
+
end
|
165
|
+
|
166
|
+
def stop_rule_usage_tracking
|
167
|
+
@devtools.send_cmd('CSS.stopRuleUsageTracking')
|
168
|
+
end
|
169
|
+
|
170
|
+
def take_coverage_delta
|
171
|
+
@devtools.send_cmd('CSS.takeCoverageDelta')
|
172
|
+
end
|
173
|
+
|
174
|
+
def set_local_fonts_enabled(enabled:)
|
175
|
+
@devtools.send_cmd('CSS.setLocalFontsEnabled',
|
176
|
+
enabled: enabled)
|
177
|
+
end
|
178
|
+
|
179
|
+
end # CSS
|
180
|
+
end # V99
|
181
|
+
end # DevTools
|
182
|
+
end # Selenium
|
@@ -0,0 +1,60 @@
|
|
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 V99
|
24
|
+
class Database
|
25
|
+
EVENTS = {
|
26
|
+
add_database: 'addDatabase',
|
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["Database.#{event}"] << block
|
36
|
+
end
|
37
|
+
|
38
|
+
def disable
|
39
|
+
@devtools.send_cmd('Database.disable')
|
40
|
+
end
|
41
|
+
|
42
|
+
def enable
|
43
|
+
@devtools.send_cmd('Database.enable')
|
44
|
+
end
|
45
|
+
|
46
|
+
def execute_sql(database_id:, query:)
|
47
|
+
@devtools.send_cmd('Database.executeSQL',
|
48
|
+
databaseId: database_id,
|
49
|
+
query: query)
|
50
|
+
end
|
51
|
+
|
52
|
+
def get_database_table_names(database_id:)
|
53
|
+
@devtools.send_cmd('Database.getDatabaseTableNames',
|
54
|
+
databaseId: database_id)
|
55
|
+
end
|
56
|
+
|
57
|
+
end # Database
|
58
|
+
end # V99
|
59
|
+
end # DevTools
|
60
|
+
end # Selenium
|