1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
U
[±d÷`ã    @s€ddlmZddlmZmZddlmZddlZddlZddl    m
Z
ddl    m Z ddl    m Z eGd    d
„d
ƒƒZ eGd d „d ƒƒZGd d„dejƒZeGdd„dƒƒZGdd„dejƒZddœdd„Zddœdd„Zd`dddddddœdd„Zddœd d!„Zdad"d#d#dd$œd%d&„Zdbd d'd(d)d*dd+œd,d-„Zdcd.d#d#dd/œd0d1„Zddd2d2d2d2d#d#dd3œd4d5„Zdedd6dd7œd8d9„Zd:dd;œd<d=„Zdfd*dd>œd?d@„Zd:dd;œdAdB„Zd:dd;œdCdD„Zd:ddEœdFdG„Z d:ddEœdHdI„Z!d:dd;œdJdK„Z"d:dd;œdLdM„Z#d:dd;œdNdO„Z$dgdPddQœdRdS„Z%edTƒeGdUdV„dVƒƒƒZ&edWƒeGdXdY„dYƒƒƒZ'edZƒeGd[d\„d\ƒƒƒZ(ed]ƒeGd^d_„d_ƒƒƒZ)dS)hé)Ú annotationsé)Ú event_classÚ T_JSON_DICT)Ú    dataclassN)Údom)Úpage)Úruntimec@sªeZdZUdZdZded<dZded<dZded<dZded<dZ    ded    <dZ
ded
<dZ ded <dZ ded <dZ ded <dZded<dZded<dd„Zedd„ƒZdS)ÚGridHighlightConfigzC
    Configuration data for the highlighting of Grid elements.
    Nútyping.Optional[bool]Úshow_grid_extension_linesÚshow_positive_line_numbersÚshow_negative_line_numbersútyping.Optional[dom.RGBA]Úgrid_border_colorÚcell_border_colorÚgrid_border_dashÚcell_border_dashÚ row_gap_colorÚrow_hatch_colorÚcolumn_gap_colorÚcolumn_hatch_colorcCsþtƒ}|jdk    r|j|d<|jdk    r.|j|d<|jdk    rB|j|d<|jdk    rZ|j ¡|d<|jdk    rr|j ¡|d<|jdk    r†|j|d<|jdk    rš|j|d<|j    dk    r²|j     ¡|d<|j
dk    rÊ|j
 ¡|d    <|j dk    râ|j  ¡|d
<|j dk    rú|j  ¡|d <|S) NÚshowGridExtensionLinesÚshowPositiveLineNumbersÚshowNegativeLineNumbersÚgridBorderColorÚcellBorderColorÚgridBorderDashÚcellBorderDashÚ rowGapColorÚ rowHatchColorÚcolumnGapColorÚcolumnHatchColor) Údictr r rrÚto_jsonrrrrrrr©ÚselfÚjson©r(úed:\z\workplace\vscode\pyvenv\venv\Lib\site-packages\selenium/webdriver/common/devtools/v85/overlay.pyr$7s0
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
zGridHighlightConfig.to_jsoncCs|d|krt|dƒndd|kr,t|dƒndd|krBt|dƒndd|kr\tj |d¡ndd|krvtj |d¡ndd|krŒt|dƒndd|kr¢t|dƒndd|kr¼tj |d¡ndd    |krÖtj |d    ¡ndd
|krðtj |d
¡ndd |kr tj |d ¡ndd  S) Nrrrrrrrrr r!r") r r rrrrrrrrr)ÚboolrÚRGBAÚ    from_json©Úclsr'r(r(r)r,QsõzGridHighlightConfig.from_json)Ú__name__Ú
__module__Ú __qualname__Ú__doc__r Ú__annotations__r rrrrrrrrrr$Ú classmethodr,r(r(r(r)r
s
           r
c@sÚeZdZUdZdZded<dZded<dZded<dZded<dZ    ded<dZ
d    ed
<dZ d    ed <dZ d    ed <dZ d    ed <dZd    ed<dZd    ed<dZd    ed<dZd    ed<dZded<dZded<dd„Zedd„ƒZdS)ÚHighlightConfigzC
    Configuration data for the highlighting of page elements.
    Nr Ú    show_infoÚ show_stylesÚ show_rulersÚshow_accessibility_infoÚshow_extension_linesrÚ content_colorÚ padding_colorÚ border_colorÚ margin_colorÚevent_target_colorÚ shape_colorÚshape_margin_colorÚcss_grid_colorútyping.Optional[ColorFormat]Ú color_formatz$typing.Optional[GridHighlightConfig]Úgrid_highlight_configcCsftƒ}|jdk    r|j|d<|jdk    r.|j|d<|jdk    rB|j|d<|jdk    rV|j|d<|jdk    rj|j|d<|jdk    r‚|j ¡|d<|jdk    rš|j ¡|d<|j    dk    r²|j     ¡|d<|j
dk    rÊ|j
 ¡|d    <|j dk    râ|j  ¡|d
<|j dk    rú|j  ¡|d <|j dk    r|j  ¡|d <|jdk    r.|j ¡|d <|jdk    rH|j ¡|d<|jdk    rb|j ¡|d<|S)NÚshowInfoÚ
showStylesÚ
showRulersÚshowAccessibilityInfoÚshowExtensionLinesÚ contentColorÚ paddingColorÚ borderColorÚ marginColorÚeventTargetColorÚ
shapeColorÚshapeMarginColorÚ cssGridColorÚ colorFormatÚgridHighlightConfig)r#r6r7r8r9r:r;r$r<r=r>r?r@rArBrDrEr%r(r(r)r$”s@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
    zHighlightConfig.to_jsoncCs€|d|krt|dƒndd|kr,t|dƒndd|krBt|dƒndd|krXt|dƒndd|krnt|dƒndd|krˆtj |d¡ndd|kr¢tj |d¡ndd|kr¼tj |d¡ndd    |krÖtj |d    ¡ndd
|krðtj |d
¡ndd |kr tj |d ¡ndd |kr(tj |d ¡ndd |krDtj |d ¡ndd|kr^t |d¡ndd|krxt |d¡nddS)NrFrGrHrIrJrKrLrMrNrOrPrQrRrSrT)r6r7r8r9r:r;r<r=r>r?r@rArBrDrE)r*rr+r,Ú ColorFormatr
r-r(r(r)r,¶s"ñzHighlightConfig.from_json)r/r0r1r2r6r3r7r8r9r:r;r<r=r>r?r@rArBrDrEr$r4r,r(r(r(r)r5bs&
               "r5c@s,eZdZdZdZdZdd„Zedd„ƒZdS)    rUZrgbZhslÚhexcCs|jS©N©Úvalue©r&r(r(r)r$ÐszColorFormat.to_jsoncCs||ƒSrWr(r-r(r(r)r,ÓszColorFormat.from_jsonN)    r/r0r1ÚRGBZHSLZHEX_r$r4r,r(r(r(r)rUËs rUc@sFeZdZUdZded<dZded<dZded<dd    „Zed
d „ƒZ    dS) Ú HingeConfigz-
    Configuration for dual screen hinge
    zdom.RectÚrectNrr;Ú outline_colorcCsHtƒ}|j ¡|d<|jdk    r,|j ¡|d<|jdk    rD|j ¡|d<|S)Nr]rKÚ outlineColor)r#r]r$r;r^r%r(r(r)r$æs
 
zHingeConfig.to_jsoncCsJ|tj |d¡d|kr(tj |d¡ndd|krBtj |d¡nddS)Nr]rKr_)r]r;r^)rZRectr,r+r-r(r(r)r,ïs
ýzHingeConfig.from_json)
r/r0r1r2r3r;r^r$r4r,r(r(r(r)r\Øs
      r\c@s4eZdZdZdZdZdZdZdd„Ze    dd    „ƒZ
d
S) Ú InspectModeZ searchForNodeZsearchForUAShadowDOMZcaptureAreaScreenshotZ showDistancesÚnonecCs|jSrWrXrZr(r(r)r$ÿszInspectMode.to_jsoncCs||ƒSrWr(r-r(r(r)r,szInspectMode.from_jsonN) r/r0r1ZSEARCH_FOR_NODEZSEARCH_FOR_UA_SHADOW_DOMZCAPTURE_AREA_SCREENSHOTZSHOW_DISTANCESÚNONEr$r4r,r(r(r(r)r`øsr`z0typing.Generator[T_JSON_DICT, T_JSON_DICT, None])Úreturnccsddi}|V}dS)z(
    Disables domain notifications.
    ÚmethodzOverlay.disableNr(©Úcmd_dictr'r(r(r)Údisablesÿrgccsddi}|V}dS)z'
    Enables domain notifications.
    rdzOverlay.enableNr(rer(r(r)Úenablesÿrhú
dom.NodeIdr rCz0typing.Generator[T_JSON_DICT, T_JSON_DICT, dict])Únode_idÚinclude_distanceÚ include_stylerDr9rcccsrtƒ}| ¡|d<|dk    r"||d<|dk    r2||d<|dk    rF| ¡|d<|dk    rV||d<d|dœ}|V}t|d    ƒS)
aÓ
    For testing.
 
    :param node_id: Id of the node to get highlight object for.
    :param include_distance: *(Optional)* Whether to include distance info.
    :param include_style: *(Optional)* Whether to include style info.
    :param color_format: *(Optional)* The color format to get config with (default: hex).
    :param show_accessibility_info: *(Optional)* Whether to show accessibility info (default: true).
    :returns: Highlight data for the node.
    ÚnodeIdNZincludeDistanceZ includeStylerSrIz!Overlay.getHighlightObjectForTest©rdÚparamsZ    highlight©r#r$)rjrkrlrDr9rorfr'r(r(r)Úget_highlight_object_for_tests  þrqccsddi}|V}dS)z
    Hides any highlight.
    rdzOverlay.hideHighlightNr(rer(r(r)Úhide_highlight>sÿrrz page.FrameIdr)Úframe_idr;Úcontent_outline_colorrcccsNtƒ}| ¡|d<|dk    r&| ¡|d<|dk    r:| ¡|d<d|dœ}|V}dS)aM
    Highlights owner element of the frame with given id.
 
    :param frame_id: Identifier of the frame to highlight.
    :param content_color: *(Optional)* The content box highlight fill color (default: transparent).
    :param content_outline_color: *(Optional)* The content box highlight outline color (default: transparent).
    ZframeIdNrKZcontentOutlineColorzOverlay.highlightFramernrp)rsr;rtrorfr'r(r(r)Úhighlight_frameHs    þruztyping.Optional[dom.NodeId]z"typing.Optional[dom.BackendNodeId]z'typing.Optional[runtime.RemoteObjectId]ztyping.Optional[str])Úhighlight_configrjÚbackend_node_idÚ    object_idÚselectorrcccsrtƒ}| ¡|d<|dk    r&| ¡|d<|dk    r:| ¡|d<|dk    rN| ¡|d<|dk    r^||d<d|dœ}|V}dS)    a
    Highlights DOM node with given id or with the given JavaScript object wrapper. Either nodeId or
    objectId must be specified.
 
    :param highlight_config: A descriptor for the highlight appearance.
    :param node_id: *(Optional)* Identifier of the node to highlight.
    :param backend_node_id: *(Optional)* Identifier of the backend node to highlight.
    :param object_id: *(Optional)* JavaScript object id of the node to be highlighted.
    :param selector: *(Optional)* Selectors to highlight relevant nodes.
    ÚhighlightConfigNrmÚ backendNodeIdZobjectIdryzOverlay.highlightNodernrp)rvrjrwrxryrorfr'r(r(r)Úhighlight_nodeas    þr|zdom.Quad)ÚquadÚcolorr^rcccsNtƒ}| ¡|d<|dk    r&| ¡|d<|dk    r:| ¡|d<d|dœ}|V}dS)a1
    Highlights given quad. Coordinates are absolute with respect to the main frame viewport.
 
    :param quad: Quad to highlight
    :param color: *(Optional)* The highlight fill color (default: transparent).
    :param outline_color: *(Optional)* The highlight outline color (default: transparent).
    r}Nr~r_zOverlay.highlightQuadrnrp)r}r~r^rorfr'r(r(r)Úhighlight_quadƒs    þrÚint)ÚxÚyÚwidthÚheightr~r^rcc    csbtƒ}||d<||d<||d<||d<|dk    r:| ¡|d<|dk    rN| ¡|d<d|d    œ}|V}dS)
a
    Highlights given rectangle. Coordinates are absolute with respect to the main frame viewport.
 
    :param x: X coordinate
    :param y: Y coordinate
    :param width: Rectangle width
    :param height: Rectangle height
    :param color: *(Optional)* The highlight fill color (default: transparent).
    :param outline_color: *(Optional)* The highlight outline color (default: transparent).
    rr‚rƒr„Nr~r_zOverlay.highlightRectrnrp)    rr‚rƒr„r~r^rorfr'r(r(r)Úhighlight_rectœs  þr…z typing.Optional[HighlightConfig])Úmodervrcccs:tƒ}| ¡|d<|dk    r&| ¡|d<d|dœ}|V}dS)av
    Enters the 'inspect' mode. In this mode, elements that user is hovering over are highlighted.
    Backend then generates 'inspectNodeRequested' event upon element selection.
 
    :param mode: Set an inspection mode.
    :param highlight_config: *(Optional)* A descriptor for the highlight appearance of hovered-over nodes. May be omitted if ```enabled == false```.
    r†NrzzOverlay.setInspectModernrp)r†rvrorfr'r(r(r)Úset_inspect_mode¾s   þr‡r*)Úshowrcccs"tƒ}||d<d|dœ}|V}dS)zu
    Highlights owner element of all frames detected to be ads.
 
    :param show: True for showing ad highlights
    rˆzOverlay.setShowAdHighlightsrnN©r#©rˆrorfr'r(r(r)Úset_show_ad_highlightsÔs þr‹)Úmessagercccs*tƒ}|dk    r||d<d|dœ}|V}dS)zk
    :param message: *(Optional)* The message to display, also triggers resume and step over controls.
    NrŒz"Overlay.setPausedInDebuggerMessagernr‰)rŒrorfr'r(r(r)Úset_paused_in_debugger_messageåsþrccs"tƒ}||d<d|dœ}|V}dS)zn
    Requests that backend shows debug borders on layers
 
    :param show: True for showing debug borders
    rˆzOverlay.setShowDebugBordersrnNr‰rŠr(r(r)Úset_show_debug_bordersõs þrŽccs"tƒ}||d<d|dœ}|V}dS)zh
    Requests that backend shows the FPS counter
 
    :param show: True for showing the FPS counter
    rˆzOverlay.setShowFPSCounterrnNr‰rŠr(r(r)Úset_show_fps_counters þr)Úresultrcccs"tƒ}||d<d|dœ}|V}dS)zl
    Requests that backend shows paint rectangles
 
    :param result: True for showing paint rectangles
    rzOverlay.setShowPaintRectsrnNr‰©rrorfr'r(r(r)Úset_show_paint_rectss þr’ccs"tƒ}||d<d|dœ}|V}dS)zt
    Requests that backend shows layout shift regions
 
    :param result: True for showing layout shift regions
    rz!Overlay.setShowLayoutShiftRegionsrnNr‰r‘r(r(r)Úset_show_layout_shift_regions(s þr“ccs"tƒ}||d<d|dœ}|V}dS)zx
    Requests that backend shows scroll bottleneck rects
 
    :param show: True for showing scroll bottleneck rects
    rˆz$Overlay.setShowScrollBottleneckRectsrnNr‰rŠr(r(r)Ú set_show_scroll_bottleneck_rects9s þr”ccs"tƒ}||d<d|dœ}|V}dS)zt
    Requests that backend shows hit-test borders on layers
 
    :param show: True for showing hit-test borders
    rˆzOverlay.setShowHitTestBordersrnNr‰rŠr(r(r)Úset_show_hit_test_bordersJs þr•ccs"tƒ}||d<d|dœ}|V}dS)zf
    Paints viewport size upon main frame resize.
 
    :param show: Whether to paint size or not.
    rˆz#Overlay.setShowViewportSizeOnResizernNr‰rŠr(r(r)Ú set_show_viewport_size_on_resize[s þr–ztyping.Optional[HingeConfig])Ú hinge_configrcccs.tƒ}|dk    r| ¡|d<d|dœ}|V}dS)zp
    Add a dual screen device hinge
 
    :param hinge_config: *(Optional)* hinge data, null means hideHinge
    NZ hingeConfigzOverlay.setShowHingernrp)r—rorfr'r(r(r)Úset_show_hingels þr˜zOverlay.inspectNodeRequestedc@s.eZdZUdZded<edddœdd„ƒZdS)    ÚInspectNodeRequestedz
    Fired when the node should be inspected. This happens after call to ``setInspectMode`` or when
    user manually inspects an element.
    zdom.BackendNodeIdrwr©r'rccCs|tj |d¡dS)Nr{)rw)rZ BackendNodeIdr,r-r(r(r)r,ˆsÿzInspectNodeRequested.from_jsonN©r/r0r1r2r3r4r,r(r(r(r)r™~s
r™zOverlay.nodeHighlightRequestedc@s.eZdZUdZded<edddœdd„ƒZdS)    ÚNodeHighlightRequestedzc
    Fired when the node should be highlighted. This happens after call to ``setInspectMode``.
    rirjrršcCs|tj |d¡dS)Nrm)rj)rZNodeIdr,r-r(r(r)r,—sÿz NodeHighlightRequested.from_jsonNr›r(r(r(r)rœs
rœzOverlay.screenshotRequestedc@s.eZdZUdZded<edddœdd„ƒZdS)    ÚScreenshotRequestedzN
    Fired when user asks to capture screenshot of some area on the page.
    z page.ViewportÚviewportrršcCs|tj |d¡dS)Nrž)rž)rZViewportr,r-r(r(r)r,§sÿzScreenshotRequested.from_jsonNr›r(r(r(r)ržs
rzOverlay.inspectModeCanceledc@s$eZdZdZedddœdd„ƒZdS)ÚInspectModeCanceledz3
    Fired when user cancels the inspect mode.
    rršcCs|ƒSrWr(r-r(r(r)r,¶szInspectModeCanceled.from_jsonN)r/r0r1r2r4r,r(r(r(r)rŸ®srŸ)NNNN)NN)NNNN)NN)NN)N)N)N)*Ú
__future__rÚutilrrZ dataclassesrÚenumÚtypingÚrrr    r
r5ÚEnumrUr\r`rgrhrqrrrur|rr…r‡r‹rrŽrr’r“r”r•r–r˜r™rœrrŸr(r(r(r)Ú<module>s~     Ph 
 û# ýû$ýú$þÿÿ