selenium-webdriver 4.0.0.beta1 → 4.0.0.rc1

Sign up to get free protection for your applications and to get access to all the features.
Files changed (247) hide show
  1. checksums.yaml +4 -4
  2. data/CHANGES +89 -0
  3. data/Gemfile +3 -1
  4. data/NOTICE +2 -0
  5. data/lib/selenium/webdriver/atoms/findElements.js +77 -78
  6. data/lib/selenium/webdriver/atoms/getAttribute.js +64 -68
  7. data/lib/selenium/webdriver/atoms/isDisplayed.js +27 -27
  8. data/lib/selenium/webdriver/atoms/mutationListener.js +17 -0
  9. data/lib/selenium/webdriver/chrome/driver.rb +21 -18
  10. data/lib/selenium/webdriver/chrome/options.rb +1 -1
  11. data/lib/selenium/webdriver/chrome/profile.rb +5 -2
  12. data/lib/selenium/webdriver/chrome/service.rb +3 -1
  13. data/lib/selenium/webdriver/chrome.rb +1 -1
  14. data/lib/selenium/webdriver/common/driver.rb +23 -4
  15. data/lib/selenium/webdriver/{devtools/v87/schema.rb → common/driver_extensions/full_page_screenshot.rb} +16 -21
  16. data/lib/selenium/webdriver/{edge/bridge.rb → common/driver_extensions/has_cdp.rb} +12 -11
  17. data/lib/selenium/webdriver/common/driver_extensions/has_devtools.rb +6 -1
  18. data/lib/selenium/webdriver/common/driver_extensions/has_log_events.rb +1 -6
  19. data/lib/selenium/webdriver/common/driver_extensions/has_network_connection.rb +4 -2
  20. data/lib/selenium/webdriver/common/driver_extensions/has_network_interception.rb +67 -0
  21. data/lib/selenium/webdriver/common/driver_extensions/has_pinned_scripts.rb +77 -0
  22. data/lib/selenium/webdriver/common/driver_extensions/prints_page.rb +28 -1
  23. data/lib/selenium/webdriver/common/element.rb +75 -17
  24. data/lib/selenium/webdriver/common/error.rb +12 -0
  25. data/lib/selenium/webdriver/common/interactions/interaction.rb +4 -1
  26. data/lib/selenium/webdriver/common/logger.rb +5 -2
  27. data/lib/selenium/webdriver/common/options.rb +62 -17
  28. data/lib/selenium/webdriver/common/proxy.rb +6 -3
  29. data/lib/selenium/webdriver/common/search_context.rb +4 -1
  30. data/lib/selenium/webdriver/common/service.rb +1 -0
  31. data/lib/selenium/webdriver/common/shadow_root.rb +87 -0
  32. data/lib/selenium/webdriver/common/socket_poller.rb +19 -30
  33. data/lib/selenium/webdriver/common/takes_screenshot.rb +9 -6
  34. data/lib/selenium/webdriver/common.rb +5 -0
  35. data/lib/selenium/webdriver/{firefox/bridge.rb → devtools/pinned_script.rb} +28 -16
  36. data/lib/selenium/webdriver/devtools/{v87/console.rb → request.rb} +32 -34
  37. data/lib/selenium/webdriver/devtools.rb +35 -25
  38. data/lib/selenium/webdriver/edge/driver.rb +2 -6
  39. data/lib/selenium/webdriver/edge/options.rb +0 -0
  40. data/lib/selenium/webdriver/edge/profile.rb +0 -0
  41. data/lib/selenium/webdriver/edge.rb +1 -1
  42. data/lib/selenium/webdriver/firefox/driver.rb +14 -13
  43. data/lib/selenium/webdriver/firefox/features.rb +6 -1
  44. data/lib/selenium/webdriver/firefox.rb +5 -1
  45. data/lib/selenium/webdriver/ie/driver.rb +1 -1
  46. data/lib/selenium/webdriver/ie/options.rb +3 -1
  47. data/lib/selenium/webdriver/ie/service.rb +4 -2
  48. data/lib/selenium/webdriver/remote/bridge.rb +65 -14
  49. data/lib/selenium/webdriver/remote/capabilities.rb +105 -52
  50. data/lib/selenium/webdriver/remote/commands.rb +5 -0
  51. data/lib/selenium/webdriver/remote/driver.rb +8 -4
  52. data/lib/selenium/webdriver/remote/http/common.rb +0 -5
  53. data/lib/selenium/webdriver/remote/http/default.rb +5 -3
  54. data/lib/selenium/webdriver/remote.rb +1 -1
  55. data/lib/selenium/webdriver/safari/driver.rb +3 -7
  56. data/lib/selenium/webdriver/safari.rb +1 -1
  57. data/lib/selenium/webdriver/support/cdp/domain.rb.erb +63 -0
  58. data/lib/selenium/webdriver/support/cdp_client_generator.rb +108 -0
  59. data/lib/selenium/webdriver/support/event_firing_bridge.rb +2 -2
  60. data/lib/selenium/webdriver/support/guards/guard.rb +89 -0
  61. data/lib/selenium/webdriver/{devtools/v87/system_info.rb → support/guards/guard_condition.rb} +24 -24
  62. data/lib/selenium/webdriver/support/guards.rb +95 -0
  63. data/lib/selenium/webdriver/support/select.rb +2 -2
  64. data/lib/selenium/webdriver/version.rb +1 -1
  65. data/lib/selenium/webdriver.rb +0 -1
  66. data/selenium-webdriver.gemspec +21 -8
  67. metadata +62 -233
  68. data/lib/selenium/webdriver/chrome/bridge.rb +0 -66
  69. data/lib/selenium/webdriver/devtools/v85/accessibility.rb +0 -64
  70. data/lib/selenium/webdriver/devtools/v85/animation.rb +0 -100
  71. data/lib/selenium/webdriver/devtools/v85/application_cache.rb +0 -66
  72. data/lib/selenium/webdriver/devtools/v85/audits.rb +0 -63
  73. data/lib/selenium/webdriver/devtools/v85/background_service.rb +0 -69
  74. data/lib/selenium/webdriver/devtools/v85/browser.rb +0 -125
  75. data/lib/selenium/webdriver/devtools/v85/cache_storage.rb +0 -75
  76. data/lib/selenium/webdriver/devtools/v85/cast.rb +0 -72
  77. data/lib/selenium/webdriver/devtools/v85/console.rb +0 -59
  78. data/lib/selenium/webdriver/devtools/v85/css.rb +0 -167
  79. data/lib/selenium/webdriver/devtools/v85/database.rb +0 -66
  80. data/lib/selenium/webdriver/devtools/v85/debugger.rb +0 -231
  81. data/lib/selenium/webdriver/devtools/v85/device_orientation.rb +0 -55
  82. data/lib/selenium/webdriver/devtools/v85/dom.rb +0 -322
  83. data/lib/selenium/webdriver/devtools/v85/dom_debugger.rb +0 -95
  84. data/lib/selenium/webdriver/devtools/v85/dom_snapshot.rb +0 -67
  85. data/lib/selenium/webdriver/devtools/v85/dom_storage.rb +0 -81
  86. data/lib/selenium/webdriver/devtools/v85/emulation.rb +0 -182
  87. data/lib/selenium/webdriver/devtools/v85/fetch.rb +0 -99
  88. data/lib/selenium/webdriver/devtools/v85/headless_experimental.rb +0 -63
  89. data/lib/selenium/webdriver/devtools/v85/heap_profiler.rb +0 -109
  90. data/lib/selenium/webdriver/devtools/v85/indexed_db.rb +0 -102
  91. data/lib/selenium/webdriver/devtools/v85/input.rb +0 -143
  92. data/lib/selenium/webdriver/devtools/v85/inspector.rb +0 -57
  93. data/lib/selenium/webdriver/devtools/v85/io.rb +0 -61
  94. data/lib/selenium/webdriver/devtools/v85/layer_tree.rb +0 -97
  95. data/lib/selenium/webdriver/devtools/v85/log.rb +0 -68
  96. data/lib/selenium/webdriver/devtools/v85/media.rb +0 -59
  97. data/lib/selenium/webdriver/devtools/v85/memory.rb +0 -88
  98. data/lib/selenium/webdriver/devtools/v85/network.rb +0 -230
  99. data/lib/selenium/webdriver/devtools/v85/overlay.rb +0 -160
  100. data/lib/selenium/webdriver/devtools/v85/page.rb +0 -376
  101. data/lib/selenium/webdriver/devtools/v85/performance.rb +0 -65
  102. data/lib/selenium/webdriver/devtools/v85/profiler.rb +0 -113
  103. data/lib/selenium/webdriver/devtools/v85/runtime.rb +0 -196
  104. data/lib/selenium/webdriver/devtools/v85/schema.rb +0 -48
  105. data/lib/selenium/webdriver/devtools/v85/security.rb +0 -73
  106. data/lib/selenium/webdriver/devtools/v85/service_worker.rb +0 -118
  107. data/lib/selenium/webdriver/devtools/v85/storage.rb +0 -97
  108. data/lib/selenium/webdriver/devtools/v85/system_info.rb +0 -52
  109. data/lib/selenium/webdriver/devtools/v85/target.rb +0 -145
  110. data/lib/selenium/webdriver/devtools/v85/tethering.rb +0 -57
  111. data/lib/selenium/webdriver/devtools/v85/tracing.rb +0 -78
  112. data/lib/selenium/webdriver/devtools/v85/web_audio.rb +0 -72
  113. data/lib/selenium/webdriver/devtools/v85/web_authn.rb +0 -96
  114. data/lib/selenium/webdriver/devtools/v86/accessibility.rb +0 -64
  115. data/lib/selenium/webdriver/devtools/v86/animation.rb +0 -100
  116. data/lib/selenium/webdriver/devtools/v86/application_cache.rb +0 -66
  117. data/lib/selenium/webdriver/devtools/v86/audits.rb +0 -63
  118. data/lib/selenium/webdriver/devtools/v86/background_service.rb +0 -69
  119. data/lib/selenium/webdriver/devtools/v86/browser.rb +0 -125
  120. data/lib/selenium/webdriver/devtools/v86/cache_storage.rb +0 -75
  121. data/lib/selenium/webdriver/devtools/v86/cast.rb +0 -72
  122. data/lib/selenium/webdriver/devtools/v86/console.rb +0 -59
  123. data/lib/selenium/webdriver/devtools/v86/css.rb +0 -181
  124. data/lib/selenium/webdriver/devtools/v86/database.rb +0 -66
  125. data/lib/selenium/webdriver/devtools/v86/debugger.rb +0 -233
  126. data/lib/selenium/webdriver/devtools/v86/device_orientation.rb +0 -55
  127. data/lib/selenium/webdriver/devtools/v86/dom.rb +0 -329
  128. data/lib/selenium/webdriver/devtools/v86/dom_debugger.rb +0 -95
  129. data/lib/selenium/webdriver/devtools/v86/dom_snapshot.rb +0 -67
  130. data/lib/selenium/webdriver/devtools/v86/dom_storage.rb +0 -81
  131. data/lib/selenium/webdriver/devtools/v86/emulation.rb +0 -193
  132. data/lib/selenium/webdriver/devtools/v86/fetch.rb +0 -99
  133. data/lib/selenium/webdriver/devtools/v86/headless_experimental.rb +0 -63
  134. data/lib/selenium/webdriver/devtools/v86/heap_profiler.rb +0 -109
  135. data/lib/selenium/webdriver/devtools/v86/indexed_db.rb +0 -102
  136. data/lib/selenium/webdriver/devtools/v86/input.rb +0 -143
  137. data/lib/selenium/webdriver/devtools/v86/inspector.rb +0 -57
  138. data/lib/selenium/webdriver/devtools/v86/io.rb +0 -61
  139. data/lib/selenium/webdriver/devtools/v86/layer_tree.rb +0 -97
  140. data/lib/selenium/webdriver/devtools/v86/log.rb +0 -68
  141. data/lib/selenium/webdriver/devtools/v86/media.rb +0 -59
  142. data/lib/selenium/webdriver/devtools/v86/memory.rb +0 -88
  143. data/lib/selenium/webdriver/devtools/v86/network.rb +0 -235
  144. data/lib/selenium/webdriver/devtools/v86/overlay.rb +0 -183
  145. data/lib/selenium/webdriver/devtools/v86/page.rb +0 -376
  146. data/lib/selenium/webdriver/devtools/v86/performance.rb +0 -65
  147. data/lib/selenium/webdriver/devtools/v86/profiler.rb +0 -113
  148. data/lib/selenium/webdriver/devtools/v86/runtime.rb +0 -196
  149. data/lib/selenium/webdriver/devtools/v86/schema.rb +0 -48
  150. data/lib/selenium/webdriver/devtools/v86/security.rb +0 -73
  151. data/lib/selenium/webdriver/devtools/v86/service_worker.rb +0 -118
  152. data/lib/selenium/webdriver/devtools/v86/storage.rb +0 -97
  153. data/lib/selenium/webdriver/devtools/v86/system_info.rb +0 -52
  154. data/lib/selenium/webdriver/devtools/v86/target.rb +0 -145
  155. data/lib/selenium/webdriver/devtools/v86/tethering.rb +0 -57
  156. data/lib/selenium/webdriver/devtools/v86/tracing.rb +0 -78
  157. data/lib/selenium/webdriver/devtools/v86/web_audio.rb +0 -72
  158. data/lib/selenium/webdriver/devtools/v86/web_authn.rb +0 -102
  159. data/lib/selenium/webdriver/devtools/v87/accessibility.rb +0 -73
  160. data/lib/selenium/webdriver/devtools/v87/animation.rb +0 -100
  161. data/lib/selenium/webdriver/devtools/v87/application_cache.rb +0 -66
  162. data/lib/selenium/webdriver/devtools/v87/audits.rb +0 -63
  163. data/lib/selenium/webdriver/devtools/v87/background_service.rb +0 -69
  164. data/lib/selenium/webdriver/devtools/v87/browser.rb +0 -125
  165. data/lib/selenium/webdriver/devtools/v87/cache_storage.rb +0 -75
  166. data/lib/selenium/webdriver/devtools/v87/cast.rb +0 -72
  167. data/lib/selenium/webdriver/devtools/v87/css.rb +0 -181
  168. data/lib/selenium/webdriver/devtools/v87/database.rb +0 -66
  169. data/lib/selenium/webdriver/devtools/v87/debugger.rb +0 -233
  170. data/lib/selenium/webdriver/devtools/v87/device_orientation.rb +0 -55
  171. data/lib/selenium/webdriver/devtools/v87/dom.rb +0 -329
  172. data/lib/selenium/webdriver/devtools/v87/dom_debugger.rb +0 -95
  173. data/lib/selenium/webdriver/devtools/v87/dom_snapshot.rb +0 -67
  174. data/lib/selenium/webdriver/devtools/v87/dom_storage.rb +0 -81
  175. data/lib/selenium/webdriver/devtools/v87/emulation.rb +0 -193
  176. data/lib/selenium/webdriver/devtools/v87/fetch.rb +0 -99
  177. data/lib/selenium/webdriver/devtools/v87/headless_experimental.rb +0 -63
  178. data/lib/selenium/webdriver/devtools/v87/heap_profiler.rb +0 -109
  179. data/lib/selenium/webdriver/devtools/v87/indexed_db.rb +0 -102
  180. data/lib/selenium/webdriver/devtools/v87/input.rb +0 -143
  181. data/lib/selenium/webdriver/devtools/v87/inspector.rb +0 -57
  182. data/lib/selenium/webdriver/devtools/v87/io.rb +0 -61
  183. data/lib/selenium/webdriver/devtools/v87/layer_tree.rb +0 -97
  184. data/lib/selenium/webdriver/devtools/v87/log.rb +0 -68
  185. data/lib/selenium/webdriver/devtools/v87/media.rb +0 -59
  186. data/lib/selenium/webdriver/devtools/v87/memory.rb +0 -88
  187. data/lib/selenium/webdriver/devtools/v87/network.rb +0 -247
  188. data/lib/selenium/webdriver/devtools/v87/overlay.rb +0 -183
  189. data/lib/selenium/webdriver/devtools/v87/page.rb +0 -376
  190. data/lib/selenium/webdriver/devtools/v87/performance.rb +0 -65
  191. data/lib/selenium/webdriver/devtools/v87/profiler.rb +0 -125
  192. data/lib/selenium/webdriver/devtools/v87/runtime.rb +0 -196
  193. data/lib/selenium/webdriver/devtools/v87/security.rb +0 -73
  194. data/lib/selenium/webdriver/devtools/v87/service_worker.rb +0 -118
  195. data/lib/selenium/webdriver/devtools/v87/storage.rb +0 -97
  196. data/lib/selenium/webdriver/devtools/v87/target.rb +0 -145
  197. data/lib/selenium/webdriver/devtools/v87/tethering.rb +0 -57
  198. data/lib/selenium/webdriver/devtools/v87/tracing.rb +0 -78
  199. data/lib/selenium/webdriver/devtools/v87/web_audio.rb +0 -72
  200. data/lib/selenium/webdriver/devtools/v87/web_authn.rb +0 -102
  201. data/lib/selenium/webdriver/devtools/v88/accessibility.rb +0 -73
  202. data/lib/selenium/webdriver/devtools/v88/animation.rb +0 -100
  203. data/lib/selenium/webdriver/devtools/v88/application_cache.rb +0 -66
  204. data/lib/selenium/webdriver/devtools/v88/audits.rb +0 -63
  205. data/lib/selenium/webdriver/devtools/v88/background_service.rb +0 -69
  206. data/lib/selenium/webdriver/devtools/v88/browser.rb +0 -130
  207. data/lib/selenium/webdriver/devtools/v88/cache_storage.rb +0 -75
  208. data/lib/selenium/webdriver/devtools/v88/cast.rb +0 -72
  209. data/lib/selenium/webdriver/devtools/v88/console.rb +0 -59
  210. data/lib/selenium/webdriver/devtools/v88/css.rb +0 -181
  211. data/lib/selenium/webdriver/devtools/v88/database.rb +0 -66
  212. data/lib/selenium/webdriver/devtools/v88/debugger.rb +0 -233
  213. data/lib/selenium/webdriver/devtools/v88/device_orientation.rb +0 -55
  214. data/lib/selenium/webdriver/devtools/v88/dom.rb +0 -329
  215. data/lib/selenium/webdriver/devtools/v88/dom_debugger.rb +0 -95
  216. data/lib/selenium/webdriver/devtools/v88/dom_snapshot.rb +0 -67
  217. data/lib/selenium/webdriver/devtools/v88/dom_storage.rb +0 -81
  218. data/lib/selenium/webdriver/devtools/v88/emulation.rb +0 -198
  219. data/lib/selenium/webdriver/devtools/v88/fetch.rb +0 -99
  220. data/lib/selenium/webdriver/devtools/v88/headless_experimental.rb +0 -63
  221. data/lib/selenium/webdriver/devtools/v88/heap_profiler.rb +0 -109
  222. data/lib/selenium/webdriver/devtools/v88/indexed_db.rb +0 -102
  223. data/lib/selenium/webdriver/devtools/v88/input.rb +0 -148
  224. data/lib/selenium/webdriver/devtools/v88/inspector.rb +0 -57
  225. data/lib/selenium/webdriver/devtools/v88/io.rb +0 -61
  226. data/lib/selenium/webdriver/devtools/v88/layer_tree.rb +0 -97
  227. data/lib/selenium/webdriver/devtools/v88/log.rb +0 -68
  228. data/lib/selenium/webdriver/devtools/v88/media.rb +0 -59
  229. data/lib/selenium/webdriver/devtools/v88/memory.rb +0 -88
  230. data/lib/selenium/webdriver/devtools/v88/network.rb +0 -247
  231. data/lib/selenium/webdriver/devtools/v88/overlay.rb +0 -183
  232. data/lib/selenium/webdriver/devtools/v88/page.rb +0 -376
  233. data/lib/selenium/webdriver/devtools/v88/performance.rb +0 -65
  234. data/lib/selenium/webdriver/devtools/v88/profiler.rb +0 -125
  235. data/lib/selenium/webdriver/devtools/v88/runtime.rb +0 -197
  236. data/lib/selenium/webdriver/devtools/v88/schema.rb +0 -48
  237. data/lib/selenium/webdriver/devtools/v88/security.rb +0 -73
  238. data/lib/selenium/webdriver/devtools/v88/service_worker.rb +0 -118
  239. data/lib/selenium/webdriver/devtools/v88/storage.rb +0 -103
  240. data/lib/selenium/webdriver/devtools/v88/system_info.rb +0 -52
  241. data/lib/selenium/webdriver/devtools/v88/target.rb +0 -145
  242. data/lib/selenium/webdriver/devtools/v88/tethering.rb +0 -57
  243. data/lib/selenium/webdriver/devtools/v88/tracing.rb +0 -79
  244. data/lib/selenium/webdriver/devtools/v88/web_audio.rb +0 -72
  245. data/lib/selenium/webdriver/devtools/v88/web_authn.rb +0 -102
  246. data/lib/selenium/webdriver/safari/bridge.rb +0 -51
  247. data/selenium_server_deploy.jar +0 -0
@@ -1,65 +0,0 @@
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 performance
25
- @performance ||= V88::Performance.new(self)
26
- end
27
-
28
- module V88
29
- class Performance
30
- EVENTS = {
31
- metrics: 'metrics',
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["Performance.#{event}"] << block
41
- end
42
-
43
- def disable
44
- @devtools.send_cmd('Performance.disable')
45
- end
46
-
47
- def enable(time_domain: nil)
48
- @devtools.send_cmd('Performance.enable',
49
- timeDomain: time_domain)
50
- end
51
-
52
- def set_time_domain(time_domain:)
53
- @devtools.send_cmd('Performance.setTimeDomain',
54
- timeDomain: time_domain)
55
- end
56
-
57
- def get_metrics
58
- @devtools.send_cmd('Performance.getMetrics')
59
- end
60
-
61
- end # V88
62
- end # Performance
63
- end # DevTools
64
- end # WebDriver
65
- end # Selenium
@@ -1,125 +0,0 @@
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 profiler
25
- @profiler ||= V88::Profiler.new(self)
26
- end
27
-
28
- module V88
29
- class Profiler
30
- EVENTS = {
31
- console_profile_finished: 'consoleProfileFinished',
32
- console_profile_started: 'consoleProfileStarted',
33
- precise_coverage_delta_update: 'preciseCoverageDeltaUpdate',
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["Profiler.#{event}"] << block
43
- end
44
-
45
- def disable
46
- @devtools.send_cmd('Profiler.disable')
47
- end
48
-
49
- def enable
50
- @devtools.send_cmd('Profiler.enable')
51
- end
52
-
53
- def get_best_effort_coverage
54
- @devtools.send_cmd('Profiler.getBestEffortCoverage')
55
- end
56
-
57
- def set_sampling_interval(interval:)
58
- @devtools.send_cmd('Profiler.setSamplingInterval',
59
- interval: interval)
60
- end
61
-
62
- def start
63
- @devtools.send_cmd('Profiler.start')
64
- end
65
-
66
- def start_precise_coverage(call_count: nil, detailed: nil, allow_triggered_updates: nil)
67
- @devtools.send_cmd('Profiler.startPreciseCoverage',
68
- callCount: call_count,
69
- detailed: detailed,
70
- allowTriggeredUpdates: allow_triggered_updates)
71
- end
72
-
73
- def start_type_profile
74
- @devtools.send_cmd('Profiler.startTypeProfile')
75
- end
76
-
77
- def stop
78
- @devtools.send_cmd('Profiler.stop')
79
- end
80
-
81
- def stop_precise_coverage
82
- @devtools.send_cmd('Profiler.stopPreciseCoverage')
83
- end
84
-
85
- def stop_type_profile
86
- @devtools.send_cmd('Profiler.stopTypeProfile')
87
- end
88
-
89
- def take_precise_coverage
90
- @devtools.send_cmd('Profiler.takePreciseCoverage')
91
- end
92
-
93
- def take_type_profile
94
- @devtools.send_cmd('Profiler.takeTypeProfile')
95
- end
96
-
97
- def enable_counters
98
- @devtools.send_cmd('Profiler.enableCounters')
99
- end
100
-
101
- def disable_counters
102
- @devtools.send_cmd('Profiler.disableCounters')
103
- end
104
-
105
- def get_counters
106
- @devtools.send_cmd('Profiler.getCounters')
107
- end
108
-
109
- def enable_runtime_call_stats
110
- @devtools.send_cmd('Profiler.enableRuntimeCallStats')
111
- end
112
-
113
- def disable_runtime_call_stats
114
- @devtools.send_cmd('Profiler.disableRuntimeCallStats')
115
- end
116
-
117
- def get_runtime_call_stats
118
- @devtools.send_cmd('Profiler.getRuntimeCallStats')
119
- end
120
-
121
- end # V88
122
- end # Profiler
123
- end # DevTools
124
- end # WebDriver
125
- end # Selenium
@@ -1,197 +0,0 @@
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 runtime
25
- @runtime ||= V88::Runtime.new(self)
26
- end
27
-
28
- module V88
29
- class Runtime
30
- EVENTS = {
31
- binding_called: 'bindingCalled',
32
- console_api_called: 'consoleAPICalled',
33
- exception_revoked: 'exceptionRevoked',
34
- exception_thrown: 'exceptionThrown',
35
- execution_context_created: 'executionContextCreated',
36
- execution_context_destroyed: 'executionContextDestroyed',
37
- execution_contexts_cleared: 'executionContextsCleared',
38
- inspect_requested: 'inspectRequested',
39
- }.freeze
40
-
41
- def initialize(devtools)
42
- @devtools = devtools
43
- end
44
-
45
- def on(event, &block)
46
- event = EVENTS[event] if event.is_a?(Symbol)
47
- @devtools.callbacks["Runtime.#{event}"] << block
48
- end
49
-
50
- def await_promise(promise_object_id:, return_by_value: nil, generate_preview: nil)
51
- @devtools.send_cmd('Runtime.awaitPromise',
52
- promiseObjectId: promise_object_id,
53
- returnByValue: return_by_value,
54
- generatePreview: generate_preview)
55
- end
56
-
57
- def call_function_on(function_declaration:, object_id: nil, arguments: nil, silent: nil, return_by_value: nil, generate_preview: nil, user_gesture: nil, await_promise: nil, execution_context_id: nil, object_group: nil)
58
- @devtools.send_cmd('Runtime.callFunctionOn',
59
- functionDeclaration: function_declaration,
60
- objectId: object_id,
61
- arguments: arguments,
62
- silent: silent,
63
- returnByValue: return_by_value,
64
- generatePreview: generate_preview,
65
- userGesture: user_gesture,
66
- awaitPromise: await_promise,
67
- executionContextId: execution_context_id,
68
- objectGroup: object_group)
69
- end
70
-
71
- def compile_script(expression:, source_url:, persist_script:, execution_context_id: nil)
72
- @devtools.send_cmd('Runtime.compileScript',
73
- expression: expression,
74
- sourceURL: source_url,
75
- persistScript: persist_script,
76
- executionContextId: execution_context_id)
77
- end
78
-
79
- def disable
80
- @devtools.send_cmd('Runtime.disable')
81
- end
82
-
83
- def discard_console_entries
84
- @devtools.send_cmd('Runtime.discardConsoleEntries')
85
- end
86
-
87
- def enable
88
- @devtools.send_cmd('Runtime.enable')
89
- end
90
-
91
- def evaluate(expression:, object_group: nil, include_command_line_api: nil, silent: nil, context_id: nil, return_by_value: nil, generate_preview: nil, user_gesture: nil, await_promise: nil, throw_on_side_effect: nil, timeout: nil, disable_breaks: nil, repl_mode: nil, allow_unsafe_eval_blocked_by_csp: nil)
92
- @devtools.send_cmd('Runtime.evaluate',
93
- expression: expression,
94
- objectGroup: object_group,
95
- includeCommandLineAPI: include_command_line_api,
96
- silent: silent,
97
- contextId: context_id,
98
- returnByValue: return_by_value,
99
- generatePreview: generate_preview,
100
- userGesture: user_gesture,
101
- awaitPromise: await_promise,
102
- throwOnSideEffect: throw_on_side_effect,
103
- timeout: timeout,
104
- disableBreaks: disable_breaks,
105
- replMode: repl_mode,
106
- allowUnsafeEvalBlockedByCSP: allow_unsafe_eval_blocked_by_csp)
107
- end
108
-
109
- def get_isolate_id
110
- @devtools.send_cmd('Runtime.getIsolateId')
111
- end
112
-
113
- def get_heap_usage
114
- @devtools.send_cmd('Runtime.getHeapUsage')
115
- end
116
-
117
- def get_properties(object_id:, own_properties: nil, accessor_properties_only: nil, generate_preview: nil)
118
- @devtools.send_cmd('Runtime.getProperties',
119
- objectId: object_id,
120
- ownProperties: own_properties,
121
- accessorPropertiesOnly: accessor_properties_only,
122
- generatePreview: generate_preview)
123
- end
124
-
125
- def global_lexical_scope_names(execution_context_id: nil)
126
- @devtools.send_cmd('Runtime.globalLexicalScopeNames',
127
- executionContextId: execution_context_id)
128
- end
129
-
130
- def query_objects(prototype_object_id:, object_group: nil)
131
- @devtools.send_cmd('Runtime.queryObjects',
132
- prototypeObjectId: prototype_object_id,
133
- objectGroup: object_group)
134
- end
135
-
136
- def release_object(object_id:)
137
- @devtools.send_cmd('Runtime.releaseObject',
138
- objectId: object_id)
139
- end
140
-
141
- def release_object_group(object_group:)
142
- @devtools.send_cmd('Runtime.releaseObjectGroup',
143
- objectGroup: object_group)
144
- end
145
-
146
- def run_if_waiting_for_debugger
147
- @devtools.send_cmd('Runtime.runIfWaitingForDebugger')
148
- end
149
-
150
- def run_script(script_id:, execution_context_id: nil, object_group: nil, silent: nil, include_command_line_api: nil, return_by_value: nil, generate_preview: nil, await_promise: nil)
151
- @devtools.send_cmd('Runtime.runScript',
152
- scriptId: script_id,
153
- executionContextId: execution_context_id,
154
- objectGroup: object_group,
155
- silent: silent,
156
- includeCommandLineAPI: include_command_line_api,
157
- returnByValue: return_by_value,
158
- generatePreview: generate_preview,
159
- awaitPromise: await_promise)
160
- end
161
-
162
- def set_async_call_stack_depth(max_depth:)
163
- @devtools.send_cmd('Runtime.setAsyncCallStackDepth',
164
- maxDepth: max_depth)
165
- end
166
-
167
- def set_custom_object_formatter_enabled(enabled:)
168
- @devtools.send_cmd('Runtime.setCustomObjectFormatterEnabled',
169
- enabled: enabled)
170
- end
171
-
172
- def set_max_call_stack_size_to_capture(size:)
173
- @devtools.send_cmd('Runtime.setMaxCallStackSizeToCapture',
174
- size: size)
175
- end
176
-
177
- def terminate_execution
178
- @devtools.send_cmd('Runtime.terminateExecution')
179
- end
180
-
181
- def add_binding(name:, execution_context_id: nil, execution_context_name: nil)
182
- @devtools.send_cmd('Runtime.addBinding',
183
- name: name,
184
- executionContextId: execution_context_id,
185
- executionContextName: execution_context_name)
186
- end
187
-
188
- def remove_binding(name:)
189
- @devtools.send_cmd('Runtime.removeBinding',
190
- name: name)
191
- end
192
-
193
- end # V88
194
- end # Runtime
195
- end # DevTools
196
- end # WebDriver
197
- end # Selenium
@@ -1,48 +0,0 @@
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 schema
25
- @schema ||= V88::Schema.new(self)
26
- end
27
-
28
- module V88
29
- class Schema
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["Schema.#{event}"] << block
38
- end
39
-
40
- def get_domains
41
- @devtools.send_cmd('Schema.getDomains')
42
- end
43
-
44
- end # V88
45
- end # Schema
46
- end # DevTools
47
- end # WebDriver
48
- end # Selenium
@@ -1,73 +0,0 @@
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 security
25
- @security ||= V88::Security.new(self)
26
- end
27
-
28
- module V88
29
- class Security
30
- EVENTS = {
31
- certificate_error: 'certificateError',
32
- visible_security_state_changed: 'visibleSecurityStateChanged',
33
- security_state_changed: 'securityStateChanged',
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["Security.#{event}"] << block
43
- end
44
-
45
- def disable
46
- @devtools.send_cmd('Security.disable')
47
- end
48
-
49
- def enable
50
- @devtools.send_cmd('Security.enable')
51
- end
52
-
53
- def set_ignore_certificate_errors(ignore:)
54
- @devtools.send_cmd('Security.setIgnoreCertificateErrors',
55
- ignore: ignore)
56
- end
57
-
58
- def handle_certificate_error(event_id:, action:)
59
- @devtools.send_cmd('Security.handleCertificateError',
60
- eventId: event_id,
61
- action: action)
62
- end
63
-
64
- def set_override_certificate_errors(override:)
65
- @devtools.send_cmd('Security.setOverrideCertificateErrors',
66
- override: override)
67
- end
68
-
69
- end # V88
70
- end # Security
71
- end # DevTools
72
- end # WebDriver
73
- end # Selenium