parsek-cdp 0.1.0__py3-none-any.whl

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (242) hide show
  1. parsek_cdp/__init__.py +55 -0
  2. parsek_cdp/_logging.py +49 -0
  3. parsek_cdp/cdp/__init__.py +247 -0
  4. parsek_cdp/cdp/accessibility/__init__.py +15 -0
  5. parsek_cdp/cdp/accessibility/events.py +35 -0
  6. parsek_cdp/cdp/accessibility/functions.py +202 -0
  7. parsek_cdp/cdp/accessibility/types.py +235 -0
  8. parsek_cdp/cdp/animation/__init__.py +15 -0
  9. parsek_cdp/cdp/animation/events.py +52 -0
  10. parsek_cdp/cdp/animation/functions.py +140 -0
  11. parsek_cdp/cdp/animation/types.py +113 -0
  12. parsek_cdp/cdp/audits/__init__.py +15 -0
  13. parsek_cdp/cdp/audits/events.py +21 -0
  14. parsek_cdp/cdp/audits/functions.py +95 -0
  15. parsek_cdp/cdp/audits/types.py +1051 -0
  16. parsek_cdp/cdp/autofill/__init__.py +15 -0
  17. parsek_cdp/cdp/autofill/events.py +27 -0
  18. parsek_cdp/cdp/autofill/functions.py +64 -0
  19. parsek_cdp/cdp/autofill/types.py +108 -0
  20. parsek_cdp/cdp/backgroundservice/__init__.py +15 -0
  21. parsek_cdp/cdp/backgroundservice/events.py +40 -0
  22. parsek_cdp/cdp/backgroundservice/functions.py +59 -0
  23. parsek_cdp/cdp/backgroundservice/types.py +63 -0
  24. parsek_cdp/cdp/bluetoothemulation/__init__.py +15 -0
  25. parsek_cdp/cdp/bluetoothemulation/events.py +70 -0
  26. parsek_cdp/cdp/bluetoothemulation/functions.py +247 -0
  27. parsek_cdp/cdp/bluetoothemulation/types.py +120 -0
  28. parsek_cdp/cdp/browser/__init__.py +15 -0
  29. parsek_cdp/cdp/browser/events.py +46 -0
  30. parsek_cdp/cdp/browser/functions.py +350 -0
  31. parsek_cdp/cdp/browser/types.py +158 -0
  32. parsek_cdp/cdp/cachestorage/__init__.py +15 -0
  33. parsek_cdp/cdp/cachestorage/events.py +13 -0
  34. parsek_cdp/cdp/cachestorage/functions.py +126 -0
  35. parsek_cdp/cdp/cachestorage/types.py +89 -0
  36. parsek_cdp/cdp/cast/__init__.py +15 -0
  37. parsek_cdp/cdp/cast/events.py +38 -0
  38. parsek_cdp/cdp/cast/functions.py +77 -0
  39. parsek_cdp/cdp/cast/types.py +23 -0
  40. parsek_cdp/cdp/console/__init__.py +15 -0
  41. parsek_cdp/cdp/console/events.py +22 -0
  42. parsek_cdp/cdp/console/functions.py +36 -0
  43. parsek_cdp/cdp/console/types.py +30 -0
  44. parsek_cdp/cdp/css/__init__.py +15 -0
  45. parsek_cdp/cdp/css/events.py +79 -0
  46. parsek_cdp/cdp/css/functions.py +788 -0
  47. parsek_cdp/cdp/css/types.py +742 -0
  48. parsek_cdp/cdp/debugger/__init__.py +15 -0
  49. parsek_cdp/cdp/debugger/events.py +164 -0
  50. parsek_cdp/cdp/debugger/functions.py +663 -0
  51. parsek_cdp/cdp/debugger/types.py +171 -0
  52. parsek_cdp/cdp/deviceaccess/__init__.py +15 -0
  53. parsek_cdp/cdp/deviceaccess/events.py +30 -0
  54. parsek_cdp/cdp/deviceaccess/functions.py +54 -0
  55. parsek_cdp/cdp/deviceaccess/types.py +28 -0
  56. parsek_cdp/cdp/deviceorientation/__init__.py +15 -0
  57. parsek_cdp/cdp/deviceorientation/events.py +13 -0
  58. parsek_cdp/cdp/deviceorientation/functions.py +35 -0
  59. parsek_cdp/cdp/deviceorientation/types.py +10 -0
  60. parsek_cdp/cdp/dom/__init__.py +15 -0
  61. parsek_cdp/cdp/dom/events.py +228 -0
  62. parsek_cdp/cdp/dom/functions.py +1033 -0
  63. parsek_cdp/cdp/dom/types.py +293 -0
  64. parsek_cdp/cdp/domdebugger/__init__.py +15 -0
  65. parsek_cdp/cdp/domdebugger/events.py +13 -0
  66. parsek_cdp/cdp/domdebugger/functions.py +155 -0
  67. parsek_cdp/cdp/domdebugger/types.py +57 -0
  68. parsek_cdp/cdp/domsnapshot/__init__.py +15 -0
  69. parsek_cdp/cdp/domsnapshot/events.py +13 -0
  70. parsek_cdp/cdp/domsnapshot/functions.py +111 -0
  71. parsek_cdp/cdp/domsnapshot/types.py +312 -0
  72. parsek_cdp/cdp/domstorage/__init__.py +15 -0
  73. parsek_cdp/cdp/domstorage/events.py +60 -0
  74. parsek_cdp/cdp/domstorage/functions.py +79 -0
  75. parsek_cdp/cdp/domstorage/types.py +30 -0
  76. parsek_cdp/cdp/emulation/__init__.py +15 -0
  77. parsek_cdp/cdp/emulation/events.py +17 -0
  78. parsek_cdp/cdp/emulation/functions.py +688 -0
  79. parsek_cdp/cdp/emulation/types.py +305 -0
  80. parsek_cdp/cdp/eventbreakpoints/__init__.py +15 -0
  81. parsek_cdp/cdp/eventbreakpoints/events.py +13 -0
  82. parsek_cdp/cdp/eventbreakpoints/functions.py +41 -0
  83. parsek_cdp/cdp/eventbreakpoints/types.py +10 -0
  84. parsek_cdp/cdp/extensions/__init__.py +15 -0
  85. parsek_cdp/cdp/extensions/events.py +13 -0
  86. parsek_cdp/cdp/extensions/functions.py +118 -0
  87. parsek_cdp/cdp/extensions/types.py +19 -0
  88. parsek_cdp/cdp/fedcm/__init__.py +15 -0
  89. parsek_cdp/cdp/fedcm/events.py +45 -0
  90. parsek_cdp/cdp/fedcm/functions.py +93 -0
  91. parsek_cdp/cdp/fedcm/types.py +72 -0
  92. parsek_cdp/cdp/fetch/__init__.py +15 -0
  93. parsek_cdp/cdp/fetch/events.py +82 -0
  94. parsek_cdp/cdp/fetch/functions.py +215 -0
  95. parsek_cdp/cdp/fetch/types.py +81 -0
  96. parsek_cdp/cdp/filesystem/__init__.py +15 -0
  97. parsek_cdp/cdp/filesystem/events.py +13 -0
  98. parsek_cdp/cdp/filesystem/functions.py +36 -0
  99. parsek_cdp/cdp/filesystem/types.py +54 -0
  100. parsek_cdp/cdp/headlessexperimental/__init__.py +15 -0
  101. parsek_cdp/cdp/headlessexperimental/events.py +13 -0
  102. parsek_cdp/cdp/headlessexperimental/functions.py +77 -0
  103. parsek_cdp/cdp/headlessexperimental/types.py +24 -0
  104. parsek_cdp/cdp/heapprofiler/__init__.py +15 -0
  105. parsek_cdp/cdp/heapprofiler/events.py +65 -0
  106. parsek_cdp/cdp/heapprofiler/functions.py +193 -0
  107. parsek_cdp/cdp/heapprofiler/types.py +57 -0
  108. parsek_cdp/cdp/indexeddb/__init__.py +15 -0
  109. parsek_cdp/cdp/indexeddb/events.py +13 -0
  110. parsek_cdp/cdp/indexeddb/functions.py +232 -0
  111. parsek_cdp/cdp/indexeddb/types.py +120 -0
  112. parsek_cdp/cdp/input/__init__.py +15 -0
  113. parsek_cdp/cdp/input/events.py +25 -0
  114. parsek_cdp/cdp/input/functions.py +361 -0
  115. parsek_cdp/cdp/input/types.py +87 -0
  116. parsek_cdp/cdp/inspector/__init__.py +15 -0
  117. parsek_cdp/cdp/inspector/events.py +41 -0
  118. parsek_cdp/cdp/inspector/functions.py +27 -0
  119. parsek_cdp/cdp/inspector/types.py +10 -0
  120. parsek_cdp/cdp/io/__init__.py +15 -0
  121. parsek_cdp/cdp/io/events.py +13 -0
  122. parsek_cdp/cdp/io/functions.py +77 -0
  123. parsek_cdp/cdp/io/types.py +13 -0
  124. parsek_cdp/cdp/layertree/__init__.py +15 -0
  125. parsek_cdp/cdp/layertree/events.py +36 -0
  126. parsek_cdp/cdp/layertree/functions.py +178 -0
  127. parsek_cdp/cdp/layertree/types.py +104 -0
  128. parsek_cdp/cdp/log/__init__.py +15 -0
  129. parsek_cdp/cdp/log/events.py +22 -0
  130. parsek_cdp/cdp/log/functions.py +54 -0
  131. parsek_cdp/cdp/log/types.py +57 -0
  132. parsek_cdp/cdp/media/__init__.py +15 -0
  133. parsek_cdp/cdp/media/events.py +87 -0
  134. parsek_cdp/cdp/media/functions.py +27 -0
  135. parsek_cdp/cdp/media/types.py +101 -0
  136. parsek_cdp/cdp/memory/__init__.py +15 -0
  137. parsek_cdp/cdp/memory/events.py +13 -0
  138. parsek_cdp/cdp/memory/functions.py +164 -0
  139. parsek_cdp/cdp/memory/types.py +71 -0
  140. parsek_cdp/cdp/mixins/__init__.py +21 -0
  141. parsek_cdp/cdp/mixins/datatype.py +123 -0
  142. parsek_cdp/cdp/mixins/event.py +78 -0
  143. parsek_cdp/cdp/mixins/namespace.py +31 -0
  144. parsek_cdp/cdp/network/__init__.py +15 -0
  145. parsek_cdp/cdp/network/events.py +726 -0
  146. parsek_cdp/cdp/network/functions.py +734 -0
  147. parsek_cdp/cdp/network/types.py +1247 -0
  148. parsek_cdp/cdp/overlay/__init__.py +15 -0
  149. parsek_cdp/cdp/overlay/events.py +54 -0
  150. parsek_cdp/cdp/overlay/functions.py +407 -0
  151. parsek_cdp/cdp/overlay/types.py +328 -0
  152. parsek_cdp/cdp/page/__init__.py +15 -0
  153. parsek_cdp/cdp/page/events.py +416 -0
  154. parsek_cdp/cdp/page/functions.py +1081 -0
  155. parsek_cdp/cdp/page/types.py +1088 -0
  156. parsek_cdp/cdp/performance/__init__.py +15 -0
  157. parsek_cdp/cdp/performance/events.py +24 -0
  158. parsek_cdp/cdp/performance/functions.py +63 -0
  159. parsek_cdp/cdp/performance/types.py +22 -0
  160. parsek_cdp/cdp/performancetimeline/__init__.py +15 -0
  161. parsek_cdp/cdp/performancetimeline/events.py +22 -0
  162. parsek_cdp/cdp/performancetimeline/functions.py +30 -0
  163. parsek_cdp/cdp/performancetimeline/types.py +85 -0
  164. parsek_cdp/cdp/preload/__init__.py +15 -0
  165. parsek_cdp/cdp/preload/events.py +116 -0
  166. parsek_cdp/cdp/preload/functions.py +25 -0
  167. parsek_cdp/cdp/preload/types.py +267 -0
  168. parsek_cdp/cdp/profiler/__init__.py +15 -0
  169. parsek_cdp/cdp/profiler/events.py +64 -0
  170. parsek_cdp/cdp/profiler/functions.py +134 -0
  171. parsek_cdp/cdp/profiler/types.py +105 -0
  172. parsek_cdp/cdp/pwa/__init__.py +15 -0
  173. parsek_cdp/cdp/pwa/events.py +13 -0
  174. parsek_cdp/cdp/pwa/functions.py +196 -0
  175. parsek_cdp/cdp/pwa/types.py +45 -0
  176. parsek_cdp/cdp/runtime/__init__.py +15 -0
  177. parsek_cdp/cdp/runtime/events.py +123 -0
  178. parsek_cdp/cdp/runtime/functions.py +552 -0
  179. parsek_cdp/cdp/runtime/types.py +319 -0
  180. parsek_cdp/cdp/schema/__init__.py +15 -0
  181. parsek_cdp/cdp/schema/events.py +13 -0
  182. parsek_cdp/cdp/schema/functions.py +32 -0
  183. parsek_cdp/cdp/schema/types.py +22 -0
  184. parsek_cdp/cdp/security/__init__.py +15 -0
  185. parsek_cdp/cdp/security/events.py +64 -0
  186. parsek_cdp/cdp/security/functions.py +66 -0
  187. parsek_cdp/cdp/security/types.py +168 -0
  188. parsek_cdp/cdp/serviceworker/__init__.py +15 -0
  189. parsek_cdp/cdp/serviceworker/events.py +43 -0
  190. parsek_cdp/cdp/serviceworker/functions.py +115 -0
  191. parsek_cdp/cdp/serviceworker/types.py +95 -0
  192. parsek_cdp/cdp/storage/__init__.py +15 -0
  193. parsek_cdp/cdp/storage/events.py +288 -0
  194. parsek_cdp/cdp/storage/functions.py +571 -0
  195. parsek_cdp/cdp/storage/types.py +656 -0
  196. parsek_cdp/cdp/systeminfo/__init__.py +15 -0
  197. parsek_cdp/cdp/systeminfo/events.py +13 -0
  198. parsek_cdp/cdp/systeminfo/functions.py +75 -0
  199. parsek_cdp/cdp/systeminfo/types.py +132 -0
  200. parsek_cdp/cdp/target/__init__.py +15 -0
  201. parsek_cdp/cdp/target/events.py +109 -0
  202. parsek_cdp/cdp/target/functions.py +424 -0
  203. parsek_cdp/cdp/target/types.py +83 -0
  204. parsek_cdp/cdp/tethering/__init__.py +15 -0
  205. parsek_cdp/cdp/tethering/events.py +22 -0
  206. parsek_cdp/cdp/tethering/functions.py +35 -0
  207. parsek_cdp/cdp/tethering/types.py +10 -0
  208. parsek_cdp/cdp/tracing/__init__.py +15 -0
  209. parsek_cdp/cdp/tracing/events.py +61 -0
  210. parsek_cdp/cdp/tracing/functions.py +119 -0
  211. parsek_cdp/cdp/tracing/types.py +81 -0
  212. parsek_cdp/cdp/webaudio/__init__.py +15 -0
  213. parsek_cdp/cdp/webaudio/events.py +184 -0
  214. parsek_cdp/cdp/webaudio/functions.py +51 -0
  215. parsek_cdp/cdp/webaudio/types.py +155 -0
  216. parsek_cdp/cdp/webauthn/__init__.py +15 -0
  217. parsek_cdp/cdp/webauthn/events.py +69 -0
  218. parsek_cdp/cdp/webauthn/functions.py +214 -0
  219. parsek_cdp/cdp/webauthn/types.py +96 -0
  220. parsek_cdp/core/__init__.py +18 -0
  221. parsek_cdp/core/browser.py +240 -0
  222. parsek_cdp/core/browser_context.py +58 -0
  223. parsek_cdp/core/element.py +405 -0
  224. parsek_cdp/core/feature.py +376 -0
  225. parsek_cdp/core/frame.py +351 -0
  226. parsek_cdp/core/pagable.py +175 -0
  227. parsek_cdp/core/page.py +163 -0
  228. parsek_cdp/core/target.py +490 -0
  229. parsek_cdp/features/__init__.py +14 -0
  230. parsek_cdp/features/request_listener/__init__.py +256 -0
  231. parsek_cdp/features/request_listener/events.py +48 -0
  232. parsek_cdp/features/request_listener/types.py +235 -0
  233. parsek_cdp/generate.py +642 -0
  234. parsek_cdp/parsek/__init__.py +18 -0
  235. parsek_cdp/parsek/events.py +38 -0
  236. parsek_cdp/parsek/types.py +36 -0
  237. parsek_cdp/py.typed +0 -0
  238. parsek_cdp-0.1.0.dist-info/METADATA +277 -0
  239. parsek_cdp-0.1.0.dist-info/RECORD +242 -0
  240. parsek_cdp-0.1.0.dist-info/WHEEL +5 -0
  241. parsek_cdp-0.1.0.dist-info/licenses/LICENSE +201 -0
  242. parsek_cdp-0.1.0.dist-info/top_level.txt +1 -0
@@ -0,0 +1,15 @@
1
+ """The Overlay CDP domain (generated).
2
+
3
+ Importing ``Overlay`` from ``parsek_cdp.cdp`` gives a namespace with this
4
+ domain's events and types as attributes (``Overlay.SomeEvent`` /
5
+ ``Overlay.SomeType``); commands run on a target via ``page.cdp.Overlay``.
6
+ """
7
+ from . import events, functions, types
8
+ from .functions import Overlay
9
+ from .events import * # noqa: F401,F403 -- expose events on the namespace
10
+ from .types import * # noqa: F401,F403 -- expose types on the namespace
11
+
12
+ #: Protocol domain name (used by features that declare ``domains=(Overlay,)``).
13
+ DOMAIN = "Overlay"
14
+
15
+ __all__ = ["events", "functions", "types", "Overlay", "DOMAIN"]
@@ -0,0 +1,54 @@
1
+ """Events for the Overlay domain (generated)."""
2
+ from __future__ import annotations
3
+
4
+ from dataclasses import dataclass
5
+ from typing import TYPE_CHECKING, Any, ClassVar, Dict, List, Literal, Optional
6
+
7
+ from ..mixins.datatype import FieldMeta
8
+ from ..mixins.event import Event, register_event
9
+
10
+ if TYPE_CHECKING:
11
+ from ..dom.types import BackendNodeId as DOM_BackendNodeId
12
+ from ..dom.types import NodeId as DOM_NodeId
13
+ from ..page.types import Viewport as Page_Viewport
14
+
15
+ @register_event("Overlay.inspectNodeRequested")
16
+ @dataclass
17
+ class InspectNodeRequested(Event):
18
+ """
19
+ Fired when the node should be inspected. This happens after call to `setInspectMode` or when
20
+ user manually inspects an element.
21
+ """
22
+ backend_node_id: DOM_BackendNodeId
23
+ __FIELDS__: ClassVar[tuple] = (
24
+ FieldMeta('backend_node_id', 'backendNodeId', False, 'primitive'),
25
+ )
26
+
27
+
28
+ @register_event("Overlay.nodeHighlightRequested")
29
+ @dataclass
30
+ class NodeHighlightRequested(Event):
31
+ """Fired when the node should be highlighted. This happens after call to `setInspectMode`."""
32
+ node_id: DOM_NodeId
33
+ __FIELDS__: ClassVar[tuple] = (
34
+ FieldMeta('node_id', 'nodeId', False, 'primitive'),
35
+ )
36
+
37
+
38
+ @register_event("Overlay.screenshotRequested")
39
+ @dataclass
40
+ class ScreenshotRequested(Event):
41
+ """Fired when user asks to capture screenshot of some area on the page."""
42
+ viewport: Page_Viewport
43
+ __FIELDS__: ClassVar[tuple] = (
44
+ FieldMeta('viewport', 'viewport', False, 'object', ref='Page.Viewport'),
45
+ )
46
+
47
+
48
+ @register_event("Overlay.inspectModeCanceled")
49
+ @dataclass
50
+ class InspectModeCanceled(Event):
51
+ """Fired when user cancels the inspect mode."""
52
+ __FIELDS__: ClassVar[tuple] = ()
53
+
54
+ __all__ = ["InspectModeCanceled", "InspectNodeRequested", "NodeHighlightRequested", "ScreenshotRequested"]
@@ -0,0 +1,407 @@
1
+ """Commands for the Overlay domain (generated)."""
2
+ from __future__ import annotations
3
+
4
+ from dataclasses import dataclass
5
+ from typing import TYPE_CHECKING, Any, ClassVar, Dict, List, Literal, Optional
6
+
7
+ from ..mixins.datatype import DataType, FieldMeta, encode
8
+
9
+ if TYPE_CHECKING:
10
+ from .types import (
11
+ ColorFormat,
12
+ ContainerQueryHighlightConfig,
13
+ FlexNodeHighlightConfig,
14
+ GridNodeHighlightConfig,
15
+ HighlightConfig,
16
+ HingeConfig,
17
+ InspectMode,
18
+ IsolatedElementHighlightConfig,
19
+ ScrollSnapHighlightConfig,
20
+ SourceOrderConfig,
21
+ WindowControlsOverlayConfig,
22
+ )
23
+ from ..dom.types import BackendNodeId as DOM_BackendNodeId
24
+ from ..dom.types import NodeId as DOM_NodeId
25
+ from ..dom.types import Quad as DOM_Quad
26
+ from ..dom.types import RGBA as DOM_RGBA
27
+ from ..page.types import FrameId as Page_FrameId
28
+ from ..runtime.types import RemoteObjectId as Runtime_RemoteObjectId
29
+
30
+ @dataclass
31
+ class GetHighlightObjectForTestReturn(DataType):
32
+ """Return value of :meth:`Overlay.get_highlight_object_for_test`."""
33
+ highlight: Dict[str, Any]
34
+ __FIELDS__: ClassVar[tuple] = (
35
+ FieldMeta('highlight', 'highlight', False, 'primitive'),
36
+ )
37
+
38
+
39
+ @dataclass
40
+ class GetGridHighlightObjectsForTestReturn(DataType):
41
+ """Return value of :meth:`Overlay.get_grid_highlight_objects_for_test`."""
42
+ highlights: Dict[str, Any]
43
+ __FIELDS__: ClassVar[tuple] = (
44
+ FieldMeta('highlights', 'highlights', False, 'primitive'),
45
+ )
46
+
47
+
48
+ @dataclass
49
+ class GetSourceOrderHighlightObjectForTestReturn(DataType):
50
+ """Return value of :meth:`Overlay.get_source_order_highlight_object_for_test`."""
51
+ highlight: Dict[str, Any]
52
+ __FIELDS__: ClassVar[tuple] = (
53
+ FieldMeta('highlight', 'highlight', False, 'primitive'),
54
+ )
55
+
56
+
57
+ class Overlay:
58
+ """Commands of the Overlay domain, bound to a target."""
59
+
60
+ def __init__(self, target: Any) -> None:
61
+ self._target = target
62
+
63
+
64
+ async def disable(self) -> None:
65
+ """Disables domain notifications."""
66
+ _params: Dict[str, Any] = {}
67
+ _result = await self._target.send('Overlay.disable', _params)
68
+ return None
69
+
70
+ async def enable(self) -> None:
71
+ """Enables domain notifications."""
72
+ _params: Dict[str, Any] = {}
73
+ _result = await self._target.send('Overlay.enable', _params)
74
+ return None
75
+
76
+ async def get_highlight_object_for_test(self, *, node_id: DOM_NodeId, include_distance: Optional[bool] = None, include_style: Optional[bool] = None, color_format: Optional[ColorFormat] = None, show_accessibility_info: Optional[bool] = None) -> GetHighlightObjectForTestReturn:
77
+ """
78
+ For testing.
79
+ :param node_id: Id of the node to get highlight object for.
80
+ :param include_distance: Whether to include distance info.
81
+ :param include_style: Whether to include style info.
82
+ :param color_format: The color format to get config with (default: hex).
83
+ :param show_accessibility_info: Whether to show accessibility info (default: true).
84
+ """
85
+ _params: Dict[str, Any] = {}
86
+ _params['nodeId'] = encode(FieldMeta('', '', False, 'primitive'), node_id)
87
+ if include_distance is not None:
88
+ _params['includeDistance'] = encode(FieldMeta('', '', False, 'primitive'), include_distance)
89
+ if include_style is not None:
90
+ _params['includeStyle'] = encode(FieldMeta('', '', False, 'primitive'), include_style)
91
+ if color_format is not None:
92
+ _params['colorFormat'] = encode(FieldMeta('', '', False, 'enum', ref='Overlay.ColorFormat'), color_format)
93
+ if show_accessibility_info is not None:
94
+ _params['showAccessibilityInfo'] = encode(FieldMeta('', '', False, 'primitive'), show_accessibility_info)
95
+ _result = await self._target.send('Overlay.getHighlightObjectForTest', _params)
96
+ return GetHighlightObjectForTestReturn.from_json(_result)
97
+
98
+ async def get_grid_highlight_objects_for_test(self, *, node_ids: List[DOM_NodeId]) -> GetGridHighlightObjectsForTestReturn:
99
+ """
100
+ For Persistent Grid testing.
101
+ :param node_ids: Ids of the node to get highlight object for.
102
+ """
103
+ _params: Dict[str, Any] = {}
104
+ _params['nodeIds'] = encode(FieldMeta('', '', False, 'array', inner=FieldMeta('', '', False, 'primitive')), node_ids)
105
+ _result = await self._target.send('Overlay.getGridHighlightObjectsForTest', _params)
106
+ return GetGridHighlightObjectsForTestReturn.from_json(_result)
107
+
108
+ async def get_source_order_highlight_object_for_test(self, *, node_id: DOM_NodeId) -> GetSourceOrderHighlightObjectForTestReturn:
109
+ """
110
+ For Source Order Viewer testing.
111
+ :param node_id: Id of the node to highlight.
112
+ """
113
+ _params: Dict[str, Any] = {}
114
+ _params['nodeId'] = encode(FieldMeta('', '', False, 'primitive'), node_id)
115
+ _result = await self._target.send('Overlay.getSourceOrderHighlightObjectForTest', _params)
116
+ return GetSourceOrderHighlightObjectForTestReturn.from_json(_result)
117
+
118
+ async def hide_highlight(self) -> None:
119
+ """Hides any highlight."""
120
+ _params: Dict[str, Any] = {}
121
+ _result = await self._target.send('Overlay.hideHighlight', _params)
122
+ return None
123
+
124
+ async def highlight_frame(self, *, frame_id: Page_FrameId, content_color: Optional[DOM_RGBA] = None, content_outline_color: Optional[DOM_RGBA] = None) -> None:
125
+ """
126
+ Highlights owner element of the frame with given id.
127
+ Deprecated: Doesn't work reliably and cannot be fixed due to process
128
+ separation (the owner node might be in a different process). Determine
129
+ the owner node in the client and use highlightNode.
130
+
131
+ .. deprecated::
132
+ :param frame_id: Identifier of the frame to highlight.
133
+ :param content_color: The content box highlight fill color (default: transparent).
134
+ :param content_outline_color: The content box highlight outline color (default: transparent).
135
+ """
136
+ _params: Dict[str, Any] = {}
137
+ _params['frameId'] = encode(FieldMeta('', '', False, 'primitive'), frame_id)
138
+ if content_color is not None:
139
+ _params['contentColor'] = encode(FieldMeta('', '', False, 'object', ref='DOM.RGBA'), content_color)
140
+ if content_outline_color is not None:
141
+ _params['contentOutlineColor'] = encode(FieldMeta('', '', False, 'object', ref='DOM.RGBA'), content_outline_color)
142
+ _result = await self._target.send('Overlay.highlightFrame', _params)
143
+ return None
144
+
145
+ async def highlight_node(self, *, highlight_config: HighlightConfig, node_id: Optional[DOM_NodeId] = None, backend_node_id: Optional[DOM_BackendNodeId] = None, object_id: Optional[Runtime_RemoteObjectId] = None, selector: Optional[str] = None) -> None:
146
+ """
147
+ Highlights DOM node with given id or with the given JavaScript object wrapper. Either nodeId or
148
+ objectId must be specified.
149
+ :param highlight_config: A descriptor for the highlight appearance.
150
+ :param node_id: Identifier of the node to highlight.
151
+ :param backend_node_id: Identifier of the backend node to highlight.
152
+ :param object_id: JavaScript object id of the node to be highlighted.
153
+ :param selector: Selectors to highlight relevant nodes.
154
+ """
155
+ _params: Dict[str, Any] = {}
156
+ _params['highlightConfig'] = encode(FieldMeta('', '', False, 'object', ref='Overlay.HighlightConfig'), highlight_config)
157
+ if node_id is not None:
158
+ _params['nodeId'] = encode(FieldMeta('', '', False, 'primitive'), node_id)
159
+ if backend_node_id is not None:
160
+ _params['backendNodeId'] = encode(FieldMeta('', '', False, 'primitive'), backend_node_id)
161
+ if object_id is not None:
162
+ _params['objectId'] = encode(FieldMeta('', '', False, 'primitive'), object_id)
163
+ if selector is not None:
164
+ _params['selector'] = encode(FieldMeta('', '', False, 'primitive'), selector)
165
+ _result = await self._target.send('Overlay.highlightNode', _params)
166
+ return None
167
+
168
+ async def highlight_quad(self, *, quad: DOM_Quad, color: Optional[DOM_RGBA] = None, outline_color: Optional[DOM_RGBA] = None) -> None:
169
+ """
170
+ Highlights given quad. Coordinates are absolute with respect to the main frame viewport.
171
+ :param quad: Quad to highlight
172
+ :param color: The highlight fill color (default: transparent).
173
+ :param outline_color: The highlight outline color (default: transparent).
174
+ """
175
+ _params: Dict[str, Any] = {}
176
+ _params['quad'] = encode(FieldMeta('', '', False, 'array', inner=FieldMeta('', '', False, 'primitive')), quad)
177
+ if color is not None:
178
+ _params['color'] = encode(FieldMeta('', '', False, 'object', ref='DOM.RGBA'), color)
179
+ if outline_color is not None:
180
+ _params['outlineColor'] = encode(FieldMeta('', '', False, 'object', ref='DOM.RGBA'), outline_color)
181
+ _result = await self._target.send('Overlay.highlightQuad', _params)
182
+ return None
183
+
184
+ async def highlight_rect(self, *, x: int, y: int, width: int, height: int, color: Optional[DOM_RGBA] = None, outline_color: Optional[DOM_RGBA] = None) -> None:
185
+ """
186
+ Highlights given rectangle. Coordinates are absolute with respect to the main frame viewport.
187
+ Issue: the method does not handle device pixel ratio (DPR) correctly.
188
+ The coordinates currently have to be adjusted by the client
189
+ if DPR is not 1 (see crbug.com/437807128).
190
+ :param x: X coordinate
191
+ :param y: Y coordinate
192
+ :param width: Rectangle width
193
+ :param height: Rectangle height
194
+ :param color: The highlight fill color (default: transparent).
195
+ :param outline_color: The highlight outline color (default: transparent).
196
+ """
197
+ _params: Dict[str, Any] = {}
198
+ _params['x'] = encode(FieldMeta('', '', False, 'primitive'), x)
199
+ _params['y'] = encode(FieldMeta('', '', False, 'primitive'), y)
200
+ _params['width'] = encode(FieldMeta('', '', False, 'primitive'), width)
201
+ _params['height'] = encode(FieldMeta('', '', False, 'primitive'), height)
202
+ if color is not None:
203
+ _params['color'] = encode(FieldMeta('', '', False, 'object', ref='DOM.RGBA'), color)
204
+ if outline_color is not None:
205
+ _params['outlineColor'] = encode(FieldMeta('', '', False, 'object', ref='DOM.RGBA'), outline_color)
206
+ _result = await self._target.send('Overlay.highlightRect', _params)
207
+ return None
208
+
209
+ async def highlight_source_order(self, *, source_order_config: SourceOrderConfig, node_id: Optional[DOM_NodeId] = None, backend_node_id: Optional[DOM_BackendNodeId] = None, object_id: Optional[Runtime_RemoteObjectId] = None) -> None:
210
+ """
211
+ Highlights the source order of the children of the DOM node with given id or with the given
212
+ JavaScript object wrapper. Either nodeId or objectId must be specified.
213
+ :param source_order_config: A descriptor for the appearance of the overlay drawing.
214
+ :param node_id: Identifier of the node to highlight.
215
+ :param backend_node_id: Identifier of the backend node to highlight.
216
+ :param object_id: JavaScript object id of the node to be highlighted.
217
+ """
218
+ _params: Dict[str, Any] = {}
219
+ _params['sourceOrderConfig'] = encode(FieldMeta('', '', False, 'object', ref='Overlay.SourceOrderConfig'), source_order_config)
220
+ if node_id is not None:
221
+ _params['nodeId'] = encode(FieldMeta('', '', False, 'primitive'), node_id)
222
+ if backend_node_id is not None:
223
+ _params['backendNodeId'] = encode(FieldMeta('', '', False, 'primitive'), backend_node_id)
224
+ if object_id is not None:
225
+ _params['objectId'] = encode(FieldMeta('', '', False, 'primitive'), object_id)
226
+ _result = await self._target.send('Overlay.highlightSourceOrder', _params)
227
+ return None
228
+
229
+ async def set_inspect_mode(self, *, mode: InspectMode, highlight_config: Optional[HighlightConfig] = None) -> None:
230
+ """
231
+ Enters the 'inspect' mode. In this mode, elements that user is hovering over are highlighted.
232
+ Backend then generates 'inspectNodeRequested' event upon element selection.
233
+ :param mode: Set an inspection mode.
234
+ :param highlight_config: A descriptor for the highlight appearance of hovered-over nodes. May be omitted if `enabled
235
+ == false`.
236
+ """
237
+ _params: Dict[str, Any] = {}
238
+ _params['mode'] = encode(FieldMeta('', '', False, 'enum', ref='Overlay.InspectMode'), mode)
239
+ if highlight_config is not None:
240
+ _params['highlightConfig'] = encode(FieldMeta('', '', False, 'object', ref='Overlay.HighlightConfig'), highlight_config)
241
+ _result = await self._target.send('Overlay.setInspectMode', _params)
242
+ return None
243
+
244
+ async def set_show_ad_highlights(self, *, show: bool) -> None:
245
+ """
246
+ Highlights owner element of all frames detected to be ads.
247
+ :param show: True for showing ad highlights
248
+ """
249
+ _params: Dict[str, Any] = {}
250
+ _params['show'] = encode(FieldMeta('', '', False, 'primitive'), show)
251
+ _result = await self._target.send('Overlay.setShowAdHighlights', _params)
252
+ return None
253
+
254
+ async def set_paused_in_debugger_message(self, *, message: Optional[str] = None) -> None:
255
+ """:param message: The message to display, also triggers resume and step over controls."""
256
+ _params: Dict[str, Any] = {}
257
+ if message is not None:
258
+ _params['message'] = encode(FieldMeta('', '', False, 'primitive'), message)
259
+ _result = await self._target.send('Overlay.setPausedInDebuggerMessage', _params)
260
+ return None
261
+
262
+ async def set_show_debug_borders(self, *, show: bool) -> None:
263
+ """
264
+ Requests that backend shows debug borders on layers
265
+ :param show: True for showing debug borders
266
+ """
267
+ _params: Dict[str, Any] = {}
268
+ _params['show'] = encode(FieldMeta('', '', False, 'primitive'), show)
269
+ _result = await self._target.send('Overlay.setShowDebugBorders', _params)
270
+ return None
271
+
272
+ async def set_show_fps_counter(self, *, show: bool) -> None:
273
+ """
274
+ Requests that backend shows the FPS counter
275
+ :param show: True for showing the FPS counter
276
+ """
277
+ _params: Dict[str, Any] = {}
278
+ _params['show'] = encode(FieldMeta('', '', False, 'primitive'), show)
279
+ _result = await self._target.send('Overlay.setShowFPSCounter', _params)
280
+ return None
281
+
282
+ async def set_show_grid_overlays(self, *, grid_node_highlight_configs: List[GridNodeHighlightConfig]) -> None:
283
+ """
284
+ Highlight multiple elements with the CSS Grid overlay.
285
+ :param grid_node_highlight_configs: An array of node identifiers and descriptors for the highlight appearance.
286
+ """
287
+ _params: Dict[str, Any] = {}
288
+ _params['gridNodeHighlightConfigs'] = encode(FieldMeta('', '', False, 'array', inner=FieldMeta('', '', False, 'object', ref='Overlay.GridNodeHighlightConfig')), grid_node_highlight_configs)
289
+ _result = await self._target.send('Overlay.setShowGridOverlays', _params)
290
+ return None
291
+
292
+ async def set_show_flex_overlays(self, *, flex_node_highlight_configs: List[FlexNodeHighlightConfig]) -> None:
293
+ """:param flex_node_highlight_configs: An array of node identifiers and descriptors for the highlight appearance."""
294
+ _params: Dict[str, Any] = {}
295
+ _params['flexNodeHighlightConfigs'] = encode(FieldMeta('', '', False, 'array', inner=FieldMeta('', '', False, 'object', ref='Overlay.FlexNodeHighlightConfig')), flex_node_highlight_configs)
296
+ _result = await self._target.send('Overlay.setShowFlexOverlays', _params)
297
+ return None
298
+
299
+ async def set_show_scroll_snap_overlays(self, *, scroll_snap_highlight_configs: List[ScrollSnapHighlightConfig]) -> None:
300
+ """:param scroll_snap_highlight_configs: An array of node identifiers and descriptors for the highlight appearance."""
301
+ _params: Dict[str, Any] = {}
302
+ _params['scrollSnapHighlightConfigs'] = encode(FieldMeta('', '', False, 'array', inner=FieldMeta('', '', False, 'object', ref='Overlay.ScrollSnapHighlightConfig')), scroll_snap_highlight_configs)
303
+ _result = await self._target.send('Overlay.setShowScrollSnapOverlays', _params)
304
+ return None
305
+
306
+ async def set_show_container_query_overlays(self, *, container_query_highlight_configs: List[ContainerQueryHighlightConfig]) -> None:
307
+ """:param container_query_highlight_configs: An array of node identifiers and descriptors for the highlight appearance."""
308
+ _params: Dict[str, Any] = {}
309
+ _params['containerQueryHighlightConfigs'] = encode(FieldMeta('', '', False, 'array', inner=FieldMeta('', '', False, 'object', ref='Overlay.ContainerQueryHighlightConfig')), container_query_highlight_configs)
310
+ _result = await self._target.send('Overlay.setShowContainerQueryOverlays', _params)
311
+ return None
312
+
313
+ async def set_show_paint_rects(self, *, result: bool) -> None:
314
+ """
315
+ Requests that backend shows paint rectangles
316
+ :param result: True for showing paint rectangles
317
+ """
318
+ _params: Dict[str, Any] = {}
319
+ _params['result'] = encode(FieldMeta('', '', False, 'primitive'), result)
320
+ _result = await self._target.send('Overlay.setShowPaintRects', _params)
321
+ return None
322
+
323
+ async def set_show_layout_shift_regions(self, *, result: bool) -> None:
324
+ """
325
+ Requests that backend shows layout shift regions
326
+ :param result: True for showing layout shift regions
327
+ """
328
+ _params: Dict[str, Any] = {}
329
+ _params['result'] = encode(FieldMeta('', '', False, 'primitive'), result)
330
+ _result = await self._target.send('Overlay.setShowLayoutShiftRegions', _params)
331
+ return None
332
+
333
+ async def set_show_scroll_bottleneck_rects(self, *, show: bool) -> None:
334
+ """
335
+ Requests that backend shows scroll bottleneck rects
336
+ :param show: True for showing scroll bottleneck rects
337
+ """
338
+ _params: Dict[str, Any] = {}
339
+ _params['show'] = encode(FieldMeta('', '', False, 'primitive'), show)
340
+ _result = await self._target.send('Overlay.setShowScrollBottleneckRects', _params)
341
+ return None
342
+
343
+ async def set_show_hit_test_borders(self, *, show: bool) -> None:
344
+ """
345
+ Deprecated, no longer has any effect.
346
+
347
+ .. deprecated::
348
+ :param show: True for showing hit-test borders
349
+ """
350
+ _params: Dict[str, Any] = {}
351
+ _params['show'] = encode(FieldMeta('', '', False, 'primitive'), show)
352
+ _result = await self._target.send('Overlay.setShowHitTestBorders', _params)
353
+ return None
354
+
355
+ async def set_show_web_vitals(self, *, show: bool) -> None:
356
+ """
357
+ Deprecated, no longer has any effect.
358
+
359
+ .. deprecated::
360
+ :param show:
361
+ """
362
+ _params: Dict[str, Any] = {}
363
+ _params['show'] = encode(FieldMeta('', '', False, 'primitive'), show)
364
+ _result = await self._target.send('Overlay.setShowWebVitals', _params)
365
+ return None
366
+
367
+ async def set_show_viewport_size_on_resize(self, *, show: bool) -> None:
368
+ """
369
+ Paints viewport size upon main frame resize.
370
+ :param show: Whether to paint size or not.
371
+ """
372
+ _params: Dict[str, Any] = {}
373
+ _params['show'] = encode(FieldMeta('', '', False, 'primitive'), show)
374
+ _result = await self._target.send('Overlay.setShowViewportSizeOnResize', _params)
375
+ return None
376
+
377
+ async def set_show_hinge(self, *, hinge_config: Optional[HingeConfig] = None) -> None:
378
+ """
379
+ Add a dual screen device hinge
380
+ :param hinge_config: hinge data, null means hideHinge
381
+ """
382
+ _params: Dict[str, Any] = {}
383
+ if hinge_config is not None:
384
+ _params['hingeConfig'] = encode(FieldMeta('', '', False, 'object', ref='Overlay.HingeConfig'), hinge_config)
385
+ _result = await self._target.send('Overlay.setShowHinge', _params)
386
+ return None
387
+
388
+ async def set_show_isolated_elements(self, *, isolated_element_highlight_configs: List[IsolatedElementHighlightConfig]) -> None:
389
+ """
390
+ Show elements in isolation mode with overlays.
391
+ :param isolated_element_highlight_configs: An array of node identifiers and descriptors for the highlight appearance.
392
+ """
393
+ _params: Dict[str, Any] = {}
394
+ _params['isolatedElementHighlightConfigs'] = encode(FieldMeta('', '', False, 'array', inner=FieldMeta('', '', False, 'object', ref='Overlay.IsolatedElementHighlightConfig')), isolated_element_highlight_configs)
395
+ _result = await self._target.send('Overlay.setShowIsolatedElements', _params)
396
+ return None
397
+
398
+ async def set_show_window_controls_overlay(self, *, window_controls_overlay_config: Optional[WindowControlsOverlayConfig] = None) -> None:
399
+ """
400
+ Show Window Controls Overlay for PWA
401
+ :param window_controls_overlay_config: Window Controls Overlay data, null means hide Window Controls Overlay
402
+ """
403
+ _params: Dict[str, Any] = {}
404
+ if window_controls_overlay_config is not None:
405
+ _params['windowControlsOverlayConfig'] = encode(FieldMeta('', '', False, 'object', ref='Overlay.WindowControlsOverlayConfig'), window_controls_overlay_config)
406
+ _result = await self._target.send('Overlay.setShowWindowControlsOverlay', _params)
407
+ return None