selenium-devtools 0.0.1.alpha

Sign up to get free protection for your applications and to get access to all the features.
Files changed (49) hide show
  1. checksums.yaml +7 -0
  2. data/lib/selenium/devtools/v88.rb +1 -0
  3. data/lib/selenium/devtools/v88/accessibility.rb +73 -0
  4. data/lib/selenium/devtools/v88/animation.rb +100 -0
  5. data/lib/selenium/devtools/v88/application_cache.rb +66 -0
  6. data/lib/selenium/devtools/v88/audits.rb +63 -0
  7. data/lib/selenium/devtools/v88/background_service.rb +69 -0
  8. data/lib/selenium/devtools/v88/browser.rb +130 -0
  9. data/lib/selenium/devtools/v88/cache_storage.rb +75 -0
  10. data/lib/selenium/devtools/v88/cast.rb +72 -0
  11. data/lib/selenium/devtools/v88/console.rb +59 -0
  12. data/lib/selenium/devtools/v88/css.rb +181 -0
  13. data/lib/selenium/devtools/v88/database.rb +66 -0
  14. data/lib/selenium/devtools/v88/debugger.rb +233 -0
  15. data/lib/selenium/devtools/v88/device_orientation.rb +55 -0
  16. data/lib/selenium/devtools/v88/dom.rb +329 -0
  17. data/lib/selenium/devtools/v88/dom_debugger.rb +95 -0
  18. data/lib/selenium/devtools/v88/dom_snapshot.rb +67 -0
  19. data/lib/selenium/devtools/v88/dom_storage.rb +81 -0
  20. data/lib/selenium/devtools/v88/emulation.rb +198 -0
  21. data/lib/selenium/devtools/v88/fetch.rb +99 -0
  22. data/lib/selenium/devtools/v88/headless_experimental.rb +63 -0
  23. data/lib/selenium/devtools/v88/heap_profiler.rb +109 -0
  24. data/lib/selenium/devtools/v88/indexed_db.rb +102 -0
  25. data/lib/selenium/devtools/v88/input.rb +148 -0
  26. data/lib/selenium/devtools/v88/inspector.rb +57 -0
  27. data/lib/selenium/devtools/v88/io.rb +61 -0
  28. data/lib/selenium/devtools/v88/layer_tree.rb +97 -0
  29. data/lib/selenium/devtools/v88/log.rb +68 -0
  30. data/lib/selenium/devtools/v88/media.rb +59 -0
  31. data/lib/selenium/devtools/v88/memory.rb +88 -0
  32. data/lib/selenium/devtools/v88/network.rb +247 -0
  33. data/lib/selenium/devtools/v88/overlay.rb +183 -0
  34. data/lib/selenium/devtools/v88/page.rb +376 -0
  35. data/lib/selenium/devtools/v88/performance.rb +65 -0
  36. data/lib/selenium/devtools/v88/profiler.rb +125 -0
  37. data/lib/selenium/devtools/v88/runtime.rb +197 -0
  38. data/lib/selenium/devtools/v88/schema.rb +48 -0
  39. data/lib/selenium/devtools/v88/security.rb +73 -0
  40. data/lib/selenium/devtools/v88/service_worker.rb +118 -0
  41. data/lib/selenium/devtools/v88/storage.rb +103 -0
  42. data/lib/selenium/devtools/v88/system_info.rb +52 -0
  43. data/lib/selenium/devtools/v88/target.rb +145 -0
  44. data/lib/selenium/devtools/v88/tethering.rb +57 -0
  45. data/lib/selenium/devtools/v88/tracing.rb +79 -0
  46. data/lib/selenium/devtools/v88/web_audio.rb +72 -0
  47. data/lib/selenium/devtools/v88/web_authn.rb +102 -0
  48. data/lib/selenium/devtools/version.rb +24 -0
  49. metadata +99 -0
@@ -0,0 +1,75 @@
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 cache_storage
25
+ @cache_storage ||= V88::CacheStorage.new(self)
26
+ end
27
+
28
+ module V88
29
+ class CacheStorage
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["CacheStorage.#{event}"] << block
38
+ end
39
+
40
+ def delete_cache(cache_id:)
41
+ @devtools.send_cmd('CacheStorage.deleteCache',
42
+ cacheId: cache_id)
43
+ end
44
+
45
+ def delete_entry(cache_id:, request:)
46
+ @devtools.send_cmd('CacheStorage.deleteEntry',
47
+ cacheId: cache_id,
48
+ request: request)
49
+ end
50
+
51
+ def request_cache_names(security_origin:)
52
+ @devtools.send_cmd('CacheStorage.requestCacheNames',
53
+ securityOrigin: security_origin)
54
+ end
55
+
56
+ def request_cached_response(cache_id:, request_url:, request_headers:)
57
+ @devtools.send_cmd('CacheStorage.requestCachedResponse',
58
+ cacheId: cache_id,
59
+ requestURL: request_url,
60
+ requestHeaders: request_headers)
61
+ end
62
+
63
+ def request_entries(cache_id:, skip_count: nil, page_size: nil, path_filter: nil)
64
+ @devtools.send_cmd('CacheStorage.requestEntries',
65
+ cacheId: cache_id,
66
+ skipCount: skip_count,
67
+ pageSize: page_size,
68
+ pathFilter: path_filter)
69
+ end
70
+
71
+ end # V88
72
+ end # CacheStorage
73
+ end # DevTools
74
+ end # WebDriver
75
+ end # Selenium
@@ -0,0 +1,72 @@
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 cast
25
+ @cast ||= V88::Cast.new(self)
26
+ end
27
+
28
+ module V88
29
+ class Cast
30
+ EVENTS = {
31
+ sinks_updated: 'sinksUpdated',
32
+ issue_updated: 'issueUpdated',
33
+ }.freeze
34
+
35
+ def initialize(devtools)
36
+ @devtools = devtools
37
+ end
38
+
39
+ def on(event, &block)
40
+ event = EVENTS[event] if event.is_a?(Symbol)
41
+ @devtools.callbacks["Cast.#{event}"] << block
42
+ end
43
+
44
+ def enable(presentation_url: nil)
45
+ @devtools.send_cmd('Cast.enable',
46
+ presentationUrl: presentation_url)
47
+ end
48
+
49
+ def disable
50
+ @devtools.send_cmd('Cast.disable')
51
+ end
52
+
53
+ def set_sink_to_use(sink_name:)
54
+ @devtools.send_cmd('Cast.setSinkToUse',
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 # V88
69
+ end # Cast
70
+ end # DevTools
71
+ end # WebDriver
72
+ 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 WebDriver
23
+ class DevTools
24
+ def console
25
+ @console ||= V88::Console.new(self)
26
+ end
27
+
28
+ module V88
29
+ class Console
30
+ EVENTS = {
31
+ message_added: 'messageAdded',
32
+ }.freeze
33
+
34
+ def initialize(devtools)
35
+ @devtools = devtools
36
+ end
37
+
38
+ def on(event, &block)
39
+ event = EVENTS[event] if event.is_a?(Symbol)
40
+ @devtools.callbacks["Console.#{event}"] << block
41
+ end
42
+
43
+ def clear_messages
44
+ @devtools.send_cmd('Console.clearMessages')
45
+ end
46
+
47
+ def disable
48
+ @devtools.send_cmd('Console.disable')
49
+ end
50
+
51
+ def enable
52
+ @devtools.send_cmd('Console.enable')
53
+ end
54
+
55
+ end # V88
56
+ end # Console
57
+ end # DevTools
58
+ end # WebDriver
59
+ end # Selenium
@@ -0,0 +1,181 @@
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 css
25
+ @css ||= V88::CSS.new(self)
26
+ end
27
+
28
+ module V88
29
+ class CSS
30
+ EVENTS = {
31
+ fonts_updated: 'fontsUpdated',
32
+ media_query_result_changed: 'mediaQueryResultChanged',
33
+ style_sheet_added: 'styleSheetAdded',
34
+ style_sheet_changed: 'styleSheetChanged',
35
+ style_sheet_removed: 'styleSheetRemoved',
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["CSS.#{event}"] << block
45
+ end
46
+
47
+ def add_rule(style_sheet_id:, rule_text:, location:)
48
+ @devtools.send_cmd('CSS.addRule',
49
+ styleSheetId: style_sheet_id,
50
+ ruleText: rule_text,
51
+ location: location)
52
+ end
53
+
54
+ def collect_class_names(style_sheet_id:)
55
+ @devtools.send_cmd('CSS.collectClassNames',
56
+ styleSheetId: style_sheet_id)
57
+ end
58
+
59
+ def create_style_sheet(frame_id:)
60
+ @devtools.send_cmd('CSS.createStyleSheet',
61
+ frameId: frame_id)
62
+ end
63
+
64
+ def disable
65
+ @devtools.send_cmd('CSS.disable')
66
+ end
67
+
68
+ def enable
69
+ @devtools.send_cmd('CSS.enable')
70
+ end
71
+
72
+ def force_pseudo_state(node_id:, forced_pseudo_classes:)
73
+ @devtools.send_cmd('CSS.forcePseudoState',
74
+ nodeId: node_id,
75
+ forcedPseudoClasses: forced_pseudo_classes)
76
+ end
77
+
78
+ def get_background_colors(node_id:)
79
+ @devtools.send_cmd('CSS.getBackgroundColors',
80
+ nodeId: node_id)
81
+ end
82
+
83
+ def get_computed_style_for_node(node_id:)
84
+ @devtools.send_cmd('CSS.getComputedStyleForNode',
85
+ nodeId: node_id)
86
+ end
87
+
88
+ def get_inline_styles_for_node(node_id:)
89
+ @devtools.send_cmd('CSS.getInlineStylesForNode',
90
+ nodeId: node_id)
91
+ end
92
+
93
+ def get_matched_styles_for_node(node_id:)
94
+ @devtools.send_cmd('CSS.getMatchedStylesForNode',
95
+ nodeId: node_id)
96
+ end
97
+
98
+ def get_media_queries
99
+ @devtools.send_cmd('CSS.getMediaQueries')
100
+ end
101
+
102
+ def get_platform_fonts_for_node(node_id:)
103
+ @devtools.send_cmd('CSS.getPlatformFontsForNode',
104
+ nodeId: node_id)
105
+ end
106
+
107
+ def get_style_sheet_text(style_sheet_id:)
108
+ @devtools.send_cmd('CSS.getStyleSheetText',
109
+ styleSheetId: style_sheet_id)
110
+ end
111
+
112
+ def track_computed_style_updates(properties_to_track:)
113
+ @devtools.send_cmd('CSS.trackComputedStyleUpdates',
114
+ propertiesToTrack: properties_to_track)
115
+ end
116
+
117
+ def take_computed_style_updates
118
+ @devtools.send_cmd('CSS.takeComputedStyleUpdates')
119
+ end
120
+
121
+ def set_effective_property_value_for_node(node_id:, property_name:, value:)
122
+ @devtools.send_cmd('CSS.setEffectivePropertyValueForNode',
123
+ nodeId: node_id,
124
+ propertyName: property_name,
125
+ value: value)
126
+ end
127
+
128
+ def set_keyframe_key(style_sheet_id:, range:, key_text:)
129
+ @devtools.send_cmd('CSS.setKeyframeKey',
130
+ styleSheetId: style_sheet_id,
131
+ range: range,
132
+ keyText: key_text)
133
+ end
134
+
135
+ def set_media_text(style_sheet_id:, range:, text:)
136
+ @devtools.send_cmd('CSS.setMediaText',
137
+ styleSheetId: style_sheet_id,
138
+ range: range,
139
+ text: text)
140
+ end
141
+
142
+ def set_rule_selector(style_sheet_id:, range:, selector:)
143
+ @devtools.send_cmd('CSS.setRuleSelector',
144
+ styleSheetId: style_sheet_id,
145
+ range: range,
146
+ selector: selector)
147
+ end
148
+
149
+ def set_style_sheet_text(style_sheet_id:, text:)
150
+ @devtools.send_cmd('CSS.setStyleSheetText',
151
+ styleSheetId: style_sheet_id,
152
+ text: text)
153
+ end
154
+
155
+ def set_style_texts(edits:)
156
+ @devtools.send_cmd('CSS.setStyleTexts',
157
+ edits: edits)
158
+ end
159
+
160
+ def start_rule_usage_tracking
161
+ @devtools.send_cmd('CSS.startRuleUsageTracking')
162
+ end
163
+
164
+ def stop_rule_usage_tracking
165
+ @devtools.send_cmd('CSS.stopRuleUsageTracking')
166
+ end
167
+
168
+ def take_coverage_delta
169
+ @devtools.send_cmd('CSS.takeCoverageDelta')
170
+ end
171
+
172
+ def set_local_fonts_enabled(enabled:)
173
+ @devtools.send_cmd('CSS.setLocalFontsEnabled',
174
+ enabled: enabled)
175
+ end
176
+
177
+ end # V88
178
+ end # CSS
179
+ end # DevTools
180
+ end # WebDriver
181
+ end # Selenium
@@ -0,0 +1,66 @@
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 database
25
+ @database ||= V88::Database.new(self)
26
+ end
27
+
28
+ module V88
29
+ class Database
30
+ EVENTS = {
31
+ add_database: 'addDatabase',
32
+ }.freeze
33
+
34
+ def initialize(devtools)
35
+ @devtools = devtools
36
+ end
37
+
38
+ def on(event, &block)
39
+ event = EVENTS[event] if event.is_a?(Symbol)
40
+ @devtools.callbacks["Database.#{event}"] << block
41
+ end
42
+
43
+ def disable
44
+ @devtools.send_cmd('Database.disable')
45
+ end
46
+
47
+ def enable
48
+ @devtools.send_cmd('Database.enable')
49
+ end
50
+
51
+ def execute_sql(database_id:, query:)
52
+ @devtools.send_cmd('Database.executeSQL',
53
+ databaseId: database_id,
54
+ query: query)
55
+ end
56
+
57
+ def get_database_table_names(database_id:)
58
+ @devtools.send_cmd('Database.getDatabaseTableNames',
59
+ databaseId: database_id)
60
+ end
61
+
62
+ end # V88
63
+ end # Database
64
+ end # DevTools
65
+ end # WebDriver
66
+ end # Selenium