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
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
U
[±dwåã@sZddlmZddlmZmZddlmZddlZddlZGdd„de    ƒZ
eGdd    „d    ƒƒZ Gd
d „d e    ƒZ Gd d „d e    ƒZ eGdd„dƒƒZeGdd„dƒƒZeGdd„dƒƒZeGdd„dƒƒZeGdd„dƒƒZeGdd„dƒƒZeGdd„dƒƒZeGdd„dƒƒZeGdd„dƒƒZGd d!„d!eƒZeGd"d#„d#ƒƒZeGd$d%„d%ƒƒZGd&d'„d'eƒZGd(d)„d)eƒZeGd*d+„d+ƒƒZeGd,d-„d-ƒƒZGd.d/„d/e    ƒZ eGd0d1„d1ƒƒZ!d›d d2d2d3d4œd5d6„Z"dœd7d8d9d2d2d2d2d2d:d;d2d;d2d3d<œd=d>„Z#dd7d7d?d:d@dAœdBdC„Z$dDdEœdFdG„Z%dDdEœdHdI„Z&dDdEœdJdK„Z'džd7d;d2d2d:d2d2d2d2d2dLd2d2d2d;d2d3dMœdNdO„Z(dPdEœdQdR„Z)dSdEœdTdU„Z*dŸd d2d2d2d2dVdWœdXdY„Z+d d:dZd[œd\d]„Z,d¡d d;d^d_œd`da„Z-d dDdbœdcdd„Z.d7dDdeœdfdg„Z/dDdEœdhdi„Z0d¢dd:d;d2d2d2d2d2d3djœ    dkdl„Z1dmdDdnœdodp„Z2d?dDdqœdrds„Z3dmdDdtœdudv„Z4dDdEœdwdx„Z5d£d7d:d;dDdyœdzd{„Z6d7dDd|œd}d~„Z7d dd€œdd‚„Z8edƒƒeGd„d…„d…ƒƒƒZ9ed†ƒeGd‡dˆ„dˆƒƒƒZ:ed‰ƒeGdŠd‹„d‹ƒƒƒZ;edŒƒeGddŽ„dŽƒƒƒZ<edƒeGdd‘„d‘ƒƒƒZ=ed’ƒeGd“d”„d”ƒƒƒZ>ed•ƒeGd–d—„d—ƒƒƒZ?ed˜ƒeGd™dš„dšƒƒƒZ@dS)¤é)Ú annotationsé)Ú event_classÚ T_JSON_DICT)Ú    dataclassNcsBeZdZdZddœdd„Zedddœdd„ƒZ‡fd    d
„Z‡ZS) ÚScriptIdz#
    Unique script identifier.
    Ústr©ÚreturncCs|S©N©©Úselfr r úfd:\z\workplace\vscode\pyvenv\venv\Lib\site-packages\selenium/webdriver/common/devtools/v112/runtime.pyÚto_jsonszScriptId.to_json©Újsonr
cCs||ƒSr r ©Úclsrr r rÚ    from_jsonszScriptId.from_jsoncsd tƒ ¡¡S)Nz ScriptId({})©ÚformatÚsuperÚ__repr__r ©Ú    __class__r rrszScriptId.__repr__©    Ú__name__Ú
__module__Ú __qualname__Ú__doc__rÚ classmethodrrÚ __classcell__r r rrr s
rc@sFeZdZUdZded<dZded<dZded<d    d
„Zed d „ƒZ    dS) ÚWebDriverValuezx
    Represents the value serialiazed by the WebDriver BiDi specification
    https://w3c.github.io/webdriver-bidi.
    rÚtype_Nútyping.Optional[typing.Any]Úvalueútyping.Optional[str]Ú    object_idcCs<tƒ}|j|d<|jdk    r$|j|d<|jdk    r8|j|d<|S)NÚtyper&ÚobjectId)Údictr$r&r(©rrr r rr(s
 
 
 
 
zWebDriverValue.to_jsoncCs:|t|dƒd|kr|dndd|kr2t|dƒnddS)Nr)r&r*)r$r&r(©rrr r rr1s
 
ýzWebDriverValue.from_json)
rrrr Ú__annotations__r&r(rr!rr r r rr#s
      r#csBeZdZdZddœdd„Zedddœdd„ƒZ‡fd    d
„Z‡ZS) ÚRemoteObjectIdz#
    Unique object identifier.
    rr    cCs|Sr r r r r rr>szRemoteObjectId.to_jsonrcCs||ƒSr r rr r rrAszRemoteObjectId.from_jsoncsd tƒ ¡¡S)NzRemoteObjectId({})rr rr rrEszRemoteObjectId.__repr__rr r rrr/:s
r/csBeZdZdZddœdd„Zedddœdd„ƒZ‡fd    d
„Z‡ZS) ÚUnserializableValuez’
    Primitive value which cannot be JSON-stringified. Includes values ``-0``, ``NaN``, ``Infinity``,
    ``-Infinity``, and bigint literals.
    rr    cCs|Sr r r r r rrNszUnserializableValue.to_jsonrcCs||ƒSr r rr r rrQszUnserializableValue.from_jsoncsd tƒ ¡¡S)NzUnserializableValue({})rr rr rrUszUnserializableValue.__repr__rr r rrr0Is
r0c@sšeZdZUdZded<dZded<dZded<dZded    <dZd
ed <dZ    ded <dZ
d ed<dZ ded<dZ ded<dZ ded<dd„Zedd„ƒZdS)Ú RemoteObjectz?
    Mirror object referencing original JavaScript object.
    rr$Nr'ÚsubtypeÚ
class_namer%r&ú$typing.Optional[UnserializableValue]Úunserializable_valueÚ descriptionztyping.Optional[WebDriverValue]Úweb_driver_valueútyping.Optional[RemoteObjectId]r(útyping.Optional[ObjectPreview]Úpreviewztyping.Optional[CustomPreview]Úcustom_previewcCsÜtƒ}|j|d<|jdk    r$|j|d<|jdk    r8|j|d<|jdk    rL|j|d<|jdk    rd|j ¡|d<|jdk    rx|j|d<|jdk    r|j ¡|d<|j    dk    r¨|j     ¡|d<|j
dk    rÀ|j
 ¡|d    <|j dk    rØ|j  ¡|d
<|S) Nr)r2Ú    classNamer&ÚunserializableValuer6ÚwebDriverValuer*r:Ú customPreview) r+r$r2r3r&r5rr6r7r(r:r;r,r r rr~s*
 
 
 
 
 
 
 
 
 
 
 
 
 
zRemoteObject.to_jsoncCsÞ|t|dƒd|kr t|dƒndd|kr6t|dƒndd|krH|dndd|kr`t |d¡ndd|krvt|dƒndd|krŽt |d¡ndd|kr¦t |d¡ndd    |kr¾t |d    ¡ndd
|krÖt |d
¡ndd 
S) Nr)r2r<r&r=r6r>r*r:r?)
r$r2r3r&r5r6r7r(r:r;)rr0rr#r/Ú ObjectPreviewÚ CustomPreviewrr r rr•s
özRemoteObject.from_json)rrrr r.r2r3r&r5r6r7r(r:r;rr!rr r r rr1Ys
         r1c@s6eZdZUded<dZded<dd„Zedd    „ƒZdS)
rArÚheaderNr8Úbody_getter_idcCs,tƒ}|j|d<|jdk    r(|j ¡|d<|S)NrBÚ bodyGetterId)r+rBrCrr,r r rr°s
 
 
zCustomPreview.to_jsoncCs*|t|dƒd|kr"t |d¡nddS)NrBrD)rBrC)rr/rrr r rr·s
þzCustomPreview.from_json)rrrr.rCrr!rr r r rrA¥s
 
 rAc@sbeZdZUdZded<ded<ded<dZd    ed
<dZd    ed <dZd ed <dd„Ze    dd„ƒZ
dS)r@z<
    Object containing abbreviated remote object value.
    rr$ÚboolÚoverflowztyping.List[PropertyPreview]Ú
propertiesNr'r2r6z*typing.Optional[typing.List[EntryPreview]]ÚentriescCsxtƒ}|j|d<|j|d<dd„|jDƒ|d<|jdk    rB|j|d<|jdk    rV|j|d<|jdk    rtdd„|jDƒ|d    <|S)
Nr)rFcSsg|] }| ¡‘qSr ©r©Ú.0Úir r rÚ
<listcomp>Úsz)ObjectPreview.to_json.<locals>.<listcomp>rGr2r6cSsg|] }| ¡‘qSr rIrJr r rrMàsrH)r+r$rFrGr2r6rHr,r r rrÖs
 
 
 
 
 
 
zObjectPreview.to_jsonc    Cst|t|dƒt|dƒdd„|dDƒd|kr:t|dƒndd|krPt|dƒndd|krld    d„|dDƒndd
S) Nr)rFcSsg|]}t |¡‘qSr )ÚPropertyPreviewrrJr r rrMèsz+ObjectPreview.from_json.<locals>.<listcomp>rGr2r6rHcSsg|]}t |¡‘qSr )Ú EntryPreviewrrJr r rrMës)r$rFrGr2r6rH)rrErr r rrãs
 
úzObjectPreview.from_json) rrrr r.r2r6rHrr!rr r r rr@¿s
    r@c@sVeZdZUded<ded<dZded<dZded<dZded    <d
d „Zed d „ƒZ    dS)rNrÚnamer$Nr'r&r9Ú value_previewr2cCs^tƒ}|j|d<|j|d<|jdk    r.|j|d<|jdk    rF|j ¡|d<|jdk    rZ|j|d<|S)NrPr)r&Ú valuePreviewr2)r+rPr$r&rQrr2r,r r rrs
 
 
 
 
 
 
zPropertyPreview.to_jsoncCs`|t|dƒt|dƒd|kr*t|dƒndd|krBt |d¡ndd|krXt|dƒnddS)NrPr)r&rRr2)rPr$r&rQr2)rr@rrr r rr s
 
ûzPropertyPreview.from_json)
rrrr.r&rQr2rr!rr r r rrNïs
    rNc@s6eZdZUded<dZded<dd„Zedd    „ƒZdS)
rOr@r&Nr9ÚkeycCs0tƒ}|j ¡|d<|jdk    r,|j ¡|d<|S)Nr&rS)r+r&rrSr,r r rrs
 
zEntryPreview.to_jsoncCs,|t |d¡d|kr$t |d¡nddS)Nr&rS)r&rS)r@rrr r rr&s þzEntryPreview.from_json)rrrr.rSrr!rr r r rrOs
 
 rOc@s’eZdZUdZded<ded<ded<dZded    <dZd
ed <dZded <dZded <dZ    d
ed<dZ
d
ed<dZ ded<dd„Z e dd„ƒZdS)ÚPropertyDescriptorz%
    Object property descriptor.
    rrPrEÚ configurableÚ
enumerableNútyping.Optional[RemoteObject]r&útyping.Optional[bool]ÚwritableÚgetÚset_Ú
was_thrownÚis_ownÚsymbolcCsÄtƒ}|j|d<|j|d<|j|d<|jdk    r<|j ¡|d<|jdk    rP|j|d<|jdk    rh|j ¡|d<|jdk    r€|j ¡|d<|j    dk    r”|j    |d<|j
dk    r¨|j
|d    <|j dk    rÀ|j  ¡|d
<|S) NrPrUrVr&rYrZÚsetÚ    wasThrownÚisOwnr^) r+rPrUrVr&rrYrZr[r\r]r^r,r r rrUs&
 
 
 
 
 
 
 
 
 
 
 
 
zPropertyDescriptor.to_jsoncCsÈ|t|dƒt|dƒt|dƒd|kr6t |d¡ndd|krLt|dƒndd|krdt |d¡ndd|kr|t |d¡ndd|kr’t|dƒndd    |kr¨t|d    ƒndd
|krÀt |d
¡ndd 
S) NrPrUrVr&rYrZr_r`rar^)
rPrUrVr&rYrZr[r\r]r^)rrEr1rrr r rrjs
 
 
özPropertyDescriptor.from_json)rrrr r.r&rYrZr[r\r]r^rr!rr r r rrT.s
       rTc@s:eZdZUdZded<dZded<dd„Zed    d
„ƒZdS) ÚInternalPropertyDescriptorzg
    Object internal property descriptor. This property isn't normally visible in JavaScript code.
    rrPNrWr&cCs,tƒ}|j|d<|jdk    r(|j ¡|d<|S)NrPr&)r+rPr&rr,r r rr…s
 
 
z"InternalPropertyDescriptor.to_jsoncCs*|t|dƒd|kr"t |d¡nddS)NrPr&)rPr&©rr1rrr r rrŒs
þz$InternalPropertyDescriptor.from_json)    rrrr r.r&rr!rr r r rrbzs
 rbc@sReZdZUdZded<dZded<dZded<dZded<d    d
„Ze    d d „ƒZ
dS) ÚPrivatePropertyDescriptorz*
    Object private field descriptor.
    rrPNrWr&rZr[cCs\tƒ}|j|d<|jdk    r(|j ¡|d<|jdk    r@|j ¡|d<|jdk    rX|j ¡|d<|S)NrPr&rZr_)r+rPr&rrZr[r,r r rr§s
 
 
 
z!PrivatePropertyDescriptor.to_jsoncCsZ|t|dƒd|kr"t |d¡ndd|kr:t |d¡ndd|krRt |d¡nddS)NrPr&rZr_)rPr&rZr[rcrr r rr²s 
üz#PrivatePropertyDescriptor.from_json) rrrr r.r&rZr[rr!rr r r rrd”s
    rdc@sJeZdZUdZdZded<dZded<dZded<d    d
„Ze    d d „ƒZ
dS) Ú CallArgumentzÂ
    Represents function call argument. Either remote object id ``objectId``, primitive ``value``,
    unserializable primitive value or neither of (for undefined) them should be specified.
    Nr%r&r4r5r8r(cCsNtƒ}|jdk    r|j|d<|jdk    r2|j ¡|d<|jdk    rJ|j ¡|d<|S)Nr&r=r*)r+r&r5rr(r,r r rrËs
 
 
 
zCallArgument.to_jsoncCsJ|d|kr|dndd|kr*t |d¡ndd|krBt |d¡nddS)Nr&r=r*)r&r5r()r0rr/rr r rrÕs
ýzCallArgument.from_json) rrrr r&r.r5r(rr!rr r r rre¼s
 
recsBeZdZdZddœdd„Zedddœdd„ƒZ‡fd    d
„Z‡ZS) ÚExecutionContextIdz%
    Id of an execution context.
    Úintr    cCs|Sr r r r r rrâszExecutionContextId.to_jsonrcCs||ƒSr r rr r rråszExecutionContextId.from_jsoncsd tƒ ¡¡S)NzExecutionContextId({})rr rr rrészExecutionContextId.__repr__rr r rrrfÞs
rfc@sReZdZUdZded<ded<ded<ded<dZd    ed
<d d „Zed d„ƒZdS)ÚExecutionContextDescriptionz+
    Description of an isolated world.
    rfÚid_rÚoriginrPÚ    unique_idNútyping.Optional[dict]Úaux_datacCsJtƒ}|j ¡|d<|j|d<|j|d<|j|d<|jdk    rF|j|d<|S)NÚidrjrPÚuniqueIdÚauxData)r+rirrjrPrkrmr,r r rrs
 
 
 
 
z#ExecutionContextDescription.to_jsoncCsH|t |d¡t|dƒt|dƒt|dƒd|kr@t|dƒnddS)NrnrjrProrp)rirjrPrkrm)rfrrr+rr r rrs 
 
 
ûz%ExecutionContextDescription.from_json)    rrrr r.rmrr!rr r r rrhís
 
rhc@sŽeZdZUdZded<ded<ded<ded<dZd    ed
<dZd ed <dZd ed<dZded<dZ    ded<dZ
ded<dd„Z e dd„ƒZ dS)ÚExceptionDetailszu
    Detailed information about exception (or error) that was thrown during script compilation or
    execution.
    rgÚ exception_idrÚtextÚ line_numberÚ column_numberNztyping.Optional[ScriptId]Ú    script_idr'Úurlútyping.Optional[StackTrace]Ú stack_tracerWÚ    exceptionú#typing.Optional[ExecutionContextId]Úexecution_context_idrlÚexception_meta_datacCsºtƒ}|j|d<|j|d<|j|d<|j|d<|jdk    rF|j ¡|d<|jdk    rZ|j|d<|jdk    rr|j ¡|d<|j    dk    rŠ|j     ¡|d<|j
dk    r¢|j
 ¡|d    <|j dk    r¶|j |d
<|S) NÚ exceptionIdrsÚ
lineNumberÚ columnNumberÚscriptIdrwÚ
stackTracerzÚexecutionContextIdÚexceptionMetaData) r+rrrsrtrurvrrwryrzr|r}r,r r rr?s$
 
 
 
 
 
 
 
 
 
 
 
zExceptionDetails.to_jsonc Cs¼|t|dƒt|dƒt|dƒt|dƒd|kr@t |d¡ndd|krVt|dƒndd|krnt |d¡ndd|kr†t |d¡ndd    |kržt |d    ¡ndd
|kr´t|d
ƒndd 
S) Nr~rsrr€rrwr‚rzrƒr„)
rrrsrtrurvrwryrzr|r})rgrrrÚ
StackTracer1rfr+rr r rrSs
 
 
 
özExceptionDetails.from_json)rrrr r.rvrwryrzr|r}rr!rr r r rrqs
      rqcsBeZdZdZddœdd„Zedddœdd„ƒZ‡fd    d
„Z‡ZS) Ú    Timestampz-
    Number of milliseconds since epoch.
    Úfloatr    cCs|Sr r r r r rrgszTimestamp.to_jsonrcCs||ƒSr r rr r rrjszTimestamp.from_jsoncsd tƒ ¡¡S)Nz Timestamp({})rr rr rrnszTimestamp.__repr__rr r rrr†cs
r†csBeZdZdZddœdd„Zedddœdd„ƒZ‡fd    d
„Z‡ZS) Ú    TimeDeltaz!
    Number of milliseconds.
    r‡r    cCs|Sr r r r r rrvszTimeDelta.to_jsonrcCs||ƒSr r rr r rryszTimeDelta.from_jsoncsd tƒ ¡¡S)Nz TimeDelta({})rr rr rr}szTimeDelta.__repr__rr r rrrˆrs
rˆc@sNeZdZUdZded<ded<ded<ded<ded    <d
d „Zed d „ƒZdS)Ú    CallFramez8
    Stack entry for runtime errors and assertions.
    rÚ function_namerrvrwrgrtrucCs@tƒ}|j|d<|j ¡|d<|j|d<|j|d<|j|d<|S)NÚ functionNamerrwrr€)r+rŠrvrrwrtrur,r r rr•s
 
 
 
zCallFrame.to_jsoncCs<|t|dƒt |d¡t|dƒt|dƒt|dƒdS)Nr‹rrwrr€)rŠrvrwrtru)rrrrgrr r rržs
 
 
 
ûzCallFrame.from_jsonN)rrrr r.rr!rr r r rr‰s
    r‰c@sReZdZUdZded<dZded<dZded<dZd    ed
<d d „Ze    d d„ƒZ
dS)r…z7
    Call frames for assertions or error messages.
    ztyping.List[CallFrame]Ú call_framesNr'r6rxÚparentztyping.Optional[StackTraceId]Ú    parent_idcCsbtƒ}dd„|jDƒ|d<|jdk    r.|j|d<|jdk    rF|j ¡|d<|jdk    r^|j ¡|d<|S)NcSsg|] }| ¡‘qSr rIrJr r rrM½sz&StackTrace.to_json.<locals>.<listcomp>Ú
callFramesr6rÚparentId)r+rŒr6rrrŽr,r r rr»s
 
 
 
zStackTrace.to_jsoncCs^|dd„|dDƒd|kr&t|dƒndd|kr>t |d¡ndd|krVt |d¡nddS)NcSsg|]}t |¡‘qSr )r‰rrJr r rrMÉsz(StackTrace.from_json.<locals>.<listcomp>rr6rr)rŒr6rrŽ)rr…rÚ StackTraceIdrr r rrÆs üzStackTrace.from_json) rrrr r.r6rrŽrr!rr r r rr…©s
    r…csBeZdZdZddœdd„Zedddœdd„ƒZ‡fd    d
„Z‡ZS) ÚUniqueDebuggerIdz0
    Unique identifier of current debugger.
    rr    cCs|Sr r r r r rrÔszUniqueDebuggerId.to_jsonrcCs||ƒSr r rr r rr×szUniqueDebuggerId.from_jsoncsd tƒ ¡¡S)NzUniqueDebuggerId({})rr rr rrÛszUniqueDebuggerId.__repr__rr r rrr’Ðs
r’c@s:eZdZUdZded<dZded<dd„Zed    d
„ƒZdS) r‘zÓ
    If ``debuggerId`` is set stack trace comes from another debugger and can be resolved there. This
    allows to track cross-debugger calls. See ``Runtime.StackTrace`` and ``Debugger.paused`` for usages.
    rriNz!typing.Optional[UniqueDebuggerId]Ú debugger_idcCs,tƒ}|j|d<|jdk    r(|j ¡|d<|S)NrnÚ
debuggerId)r+rir“rr,r r rrés
 
 
zStackTraceId.to_jsoncCs*|t|dƒd|kr"t |d¡nddS)Nrnr”)rir“)rr’rrr r rrðs
þzStackTraceId.from_json)    rrrr r.r“rr!rr r r rr‘ßs
 r‘rXzityping.Generator[T_JSON_DICT, T_JSON_DICT, typing.Tuple[RemoteObject, typing.Optional[ExceptionDetails]]])Úpromise_object_idÚreturn_by_valueÚgenerate_previewr
ccsjtƒ}| ¡|d<|dk    r"||d<|dk    r2||d<d|dœ}|V}t |d¡d|krdt |d¡ndfS)    a=
    Add handler to promise with given promise object id.
 
    :param promise_object_id: Identifier of the promise.
    :param return_by_value: *(Optional)* Whether the result is expected to be a JSON object that should be sent by value.
    :param generate_preview: *(Optional)* Whether preview should be generated for the result.
    :returns: A tuple with the following items:
 
        0. **result** - Promise result. Will contain rejected value if promise was rejected.
        1. **exceptionDetails** - *(Optional)* Exception details if stack strace is available.
    ZpromiseObjectIdNÚ returnByValueÚgeneratePreviewzRuntime.awaitPromise©ÚmethodÚparamsÚresultÚexceptionDetails©r+rr1rrq)r•r–r—rœÚcmd_dictrr r rÚ await_promiseøs þ þr¡rr8z*typing.Optional[typing.List[CallArgument]]r{r')Úfunction_declarationr(Ú    argumentsÚsilentr–r—Ú user_gesturer¡r|Ú object_groupÚthrow_on_side_effectÚunique_context_idÚgenerate_web_driver_valuer
c cstƒ} || d<|dk    r"| ¡| d<|dk    r<dd„|Dƒ| d<|dk    rL|| d<|dk    r\|| d<|dk    rl|| d    <|dk    r||| d
<|dk    rŒ|| d <|dk    r | ¡| d <|    dk    r°|    | d <|
dk    rÀ|
| d<| dk    rÐ| | d<| dk    rà| | d<d| dœ}|V}t |d¡d|krt |d¡ndfS)aþ    
    Calls function with given declaration on the given object. Object group of the result is
    inherited from the target object.
 
    :param function_declaration: Declaration of the function to call.
    :param object_id: *(Optional)* Identifier of the object to call function on. Either objectId or executionContextId should be specified.
    :param arguments: *(Optional)* Call arguments. All call arguments must belong to the same JavaScript world as the target object.
    :param silent: *(Optional)* In silent mode exceptions thrown during evaluation are not reported and do not pause execution. Overrides ```setPauseOnException```` state.
    :param return_by_value: *(Optional)* Whether the result is expected to be a JSON object which should be sent by value.
    :param generate_preview: **(EXPERIMENTAL)** *(Optional)* Whether preview should be generated for the result.
    :param user_gesture: *(Optional)* Whether execution should be treated as initiated by user in the UI.
    :param await_promise: *(Optional)* Whether execution should ````await```` for resulting value and return once awaited promise is resolved.
    :param execution_context_id: *(Optional)* Specifies execution context which global object will be used to call function on. Either executionContextId or objectId should be specified.
    :param object_group: *(Optional)* Symbolic group name that can be used to release multiple objects. If objectGroup is not specified and objectId is, objectGroup will be inherited from object.
    :param throw_on_side_effect: **(EXPERIMENTAL)** *(Optional)* Whether to throw an exception if side effect cannot be ruled out during evaluation.
    :param unique_context_id: **(EXPERIMENTAL)** *(Optional)* An alternative way to specify the execution context to call function on. Compared to contextId that may be reused across processes, this is guaranteed to be system-unique, so it can be used to prevent accidental function call in context different than intended (e.g. as a result of navigation across process boundaries). This is mutually exclusive with ````executionContextId````.
    :param generate_web_driver_value: **(EXPERIMENTAL)** *(Optional)* Whether the result should contain ````webDriverValue````, serialized according to https://w3c.github.io/webdriver-bidi. This is mutually exclusive with ````returnByValue````, but resulting ````objectId``` is still provided.
    :returns: A tuple with the following items:
 
        0. **result** - Call result.
        1. **exceptionDetails** - *(Optional)* Exception details.
    ZfunctionDeclarationNr*cSsg|] }| ¡‘qSr rIrJr r rrMCsz$call_function_on.<locals>.<listcomp>r£r¤r˜r™Ú userGestureÚ awaitPromiserƒÚ objectGroupÚthrowOnSideEffectÚuniqueContextIdÚgenerateWebDriverValuezRuntime.callFunctionOnršrržrŸ)r¢r(r£r¤r–r—r¥r¡r|r¦r§r¨r©rœr rr r rÚcall_function_onsB%  þ þr°rEzvtyping.Generator[T_JSON_DICT, T_JSON_DICT, typing.Tuple[typing.Optional[ScriptId], typing.Optional[ExceptionDetails]]])Ú
expressionÚ
source_urlÚpersist_scriptr|r
ccsvtƒ}||d<||d<||d<|dk    r2| ¡|d<d|dœ}|V}d|krXt |d¡ndd    |krpt |d    ¡ndfS)
aX
    Compiles expression.
 
    :param expression: Expression to compile.
    :param source_url: Source url to be set for the script.
    :param persist_script: Specifies whether the compiled script should be persisted.
    :param execution_context_id: *(Optional)* Specifies in which execution context to perform script run. If the parameter is omitted the evaluation will be performed in the context of the inspected page.
    :returns: A tuple with the following items:
 
        0. **scriptId** - *(Optional)* Id of the script.
        1. **exceptionDetails** - *(Optional)* Exception details.
    r±Z    sourceURLZ persistScriptNrƒzRuntime.compileScriptršrrž)r+rrrrq)r±r²r³r|rœr rr r rÚcompile_scriptcs þþr´z0typing.Generator[T_JSON_DICT, T_JSON_DICT, None]r    ccsddi}|V}dS)z<
    Disables reporting of execution contexts creation.
    r›zRuntime.disableNr ©r rr r rÚdisable†sÿr¶ccsddi}|V}dS)z>
    Discards collected exceptions and console API calls.
    r›zRuntime.discardConsoleEntriesNr rµr r rÚdiscard_console_entriessÿr·ccsddi}|V}dS)zÙ
    Enables reporting of execution contexts creation by means of ``executionContextCreated`` event.
    When the reporting gets enabled the event will be sent immediately for each existing execution
    context.
    r›zRuntime.enableNr rµr r rÚenablešsÿr¸ztyping.Optional[TimeDelta])r±r¦Úinclude_command_line_apir¤Ú
context_idr–r—r¥r¡r§ÚtimeoutÚdisable_breaksÚ    repl_modeÚ allow_unsafe_eval_blocked_by_cspr¨r©r
ccsBtƒ}||d<|dk    r||d<|dk    r.||d<|dk    r>||d<|dk    rR| ¡|d<|dk    rb||d<|dk    rr||d<|dk    r‚||d    <|dk    r’||d
<|    dk    r¢|    |d <|
dk    r¶|
 ¡|d <| dk    rÆ| |d <| dk    rÖ| |d<| dk    ræ| |d<|dk    rö||d<|dk    r||d<d|dœ}|V}t |d¡d|kr<t |d¡ndfS)a.
    Evaluates expression on global object.
 
    :param expression: Expression to evaluate.
    :param object_group: *(Optional)* Symbolic group name that can be used to release multiple objects.
    :param include_command_line_api: *(Optional)* Determines whether Command Line API should be available during the evaluation.
    :param silent: *(Optional)* In silent mode exceptions thrown during evaluation are not reported and do not pause execution. Overrides ```setPauseOnException```` state.
    :param context_id: *(Optional)* Specifies in which execution context to perform evaluation. If the parameter is omitted the evaluation will be performed in the context of the inspected page. This is mutually exclusive with ````uniqueContextId````, which offers an alternative way to identify the execution context that is more reliable in a multi-process environment.
    :param return_by_value: *(Optional)* Whether the result is expected to be a JSON object that should be sent by value.
    :param generate_preview: **(EXPERIMENTAL)** *(Optional)* Whether preview should be generated for the result.
    :param user_gesture: *(Optional)* Whether execution should be treated as initiated by user in the UI.
    :param await_promise: *(Optional)* Whether execution should ````await```` for resulting value and return once awaited promise is resolved.
    :param throw_on_side_effect: **(EXPERIMENTAL)** *(Optional)* Whether to throw an exception if side effect cannot be ruled out during evaluation. This implies ````disableBreaks```` below.
    :param timeout: **(EXPERIMENTAL)** *(Optional)* Terminate execution after timing out (number of milliseconds).
    :param disable_breaks: **(EXPERIMENTAL)** *(Optional)* Disable breakpoints during execution.
    :param repl_mode: **(EXPERIMENTAL)** *(Optional)* Setting this flag to true enables ````let```` re-declaration and top-level ````await````. Note that ````let```` variables can only be re-declared if they originate from ````replMode```` themselves.
    :param allow_unsafe_eval_blocked_by_csp: **(EXPERIMENTAL)** *(Optional)* The Content Security Policy (CSP) for the target might block 'unsafe-eval' which includes eval(), Function(), setTimeout() and setInterval() when called with non-callable arguments. This flag bypasses CSP for this evaluation and allows unsafe-eval. Defaults to true.
    :param unique_context_id: **(EXPERIMENTAL)** *(Optional)* An alternative way to specify the execution context to evaluate in. Compared to contextId that may be reused across processes, this is guaranteed to be system-unique, so it can be used to prevent accidental evaluation of the expression in context different than intended (e.g. as a result of navigation across process boundaries). This is mutually exclusive with ````contextId```.
    :param generate_web_driver_value: **(EXPERIMENTAL)** *(Optional)* Whether the result should be serialized according to https://w3c.github.io/webdriver-bidi.
    :returns: A tuple with the following items:
 
        0. **result** - Evaluation result.
        1. **exceptionDetails** - *(Optional)* Exception details.
    r±Nr¬ÚincludeCommandLineAPIr¤Z    contextIdr˜r™rªr«r­r»Z disableBreaksZreplModeZallowUnsafeEvalBlockedByCSPr®r¯zRuntime.evaluateršrržrŸ)r±r¦r¹r¤rºr–r—r¥r¡r§r»r¼r½r¾r¨r©rœr rr r rÚevaluate¦sN*  
þ þrÀz/typing.Generator[T_JSON_DICT, T_JSON_DICT, str]ccsddi}|V}t|dƒS)zV
    Returns the isolate id.
 
    **EXPERIMENTAL**
 
    :returns: The isolate id.
    r›zRuntime.getIsolateIdrnr-rµr r rÚget_isolate_idûs
    ÿrÁzFtyping.Generator[T_JSON_DICT, T_JSON_DICT, typing.Tuple[float, float]]ccs&ddi}|V}t|dƒt|dƒfS)a;
    Returns the JavaScript heap usage.
    It is the total usage of the corresponding isolate not scoped to a particular Runtime.
 
    **EXPERIMENTAL**
 
    :returns: A tuple with the following items:
 
        0. **usedSize** - Used heap size in bytes.
        1. **totalSize** - Allocated heap size in bytes.
    r›zRuntime.getHeapUsageZusedSizeZ    totalSize)r‡rµr r rÚget_heap_usage
s ÿ
 
þrÂzïtyping.Generator[T_JSON_DICT, T_JSON_DICT, typing.Tuple[typing.List[PropertyDescriptor], typing.Optional[typing.List[InternalPropertyDescriptor]], typing.Optional[typing.List[PrivatePropertyDescriptor]], typing.Optional[ExceptionDetails]]])r(Úown_propertiesÚaccessor_properties_onlyr—Únon_indexed_properties_onlyr
ccsÆtƒ}| ¡|d<|dk    r"||d<|dk    r2||d<|dk    rB||d<|dk    rR||d<d|dœ}|V}d    d
„|d Dƒd |krŒd d
„|d Dƒndd|kr¨dd
„|dDƒndd|krÀt |d¡ndfS)a0
    Returns properties of a given object. Object group of the result is inherited from the target
    object.
 
    :param object_id: Identifier of the object to return properties for.
    :param own_properties: *(Optional)* If true, returns properties belonging only to the element itself, not to its prototype chain.
    :param accessor_properties_only: **(EXPERIMENTAL)** *(Optional)* If true, returns accessor properties (with getter/setter) only; internal properties are not returned either.
    :param generate_preview: **(EXPERIMENTAL)** *(Optional)* Whether preview should be generated for the results.
    :param non_indexed_properties_only: **(EXPERIMENTAL)** *(Optional)* If true, returns non-indexed properties only.
    :returns: A tuple with the following items:
 
        0. **result** - Object properties.
        1. **internalProperties** - *(Optional)* Internal object properties (only of the element itself).
        2. **privateProperties** - *(Optional)* Object private properties.
        3. **exceptionDetails** - *(Optional)* Exception details.
    r*NZ ownPropertiesZaccessorPropertiesOnlyr™ZnonIndexedPropertiesOnlyzRuntime.getPropertiesršcSsg|]}t |¡‘qSr )rTrrJr r rrMGsz"get_properties.<locals>.<listcomp>rZinternalPropertiescSsg|]}t |¡‘qSr )rbrrJr r rrMHsZprivatePropertiescSsg|]}t |¡‘qSr )rdrrJr r rrMIsrž©r+rrqr)r(rÃrÄr—rÅrœr rr r rÚget_properties s& þürÇz<typing.Generator[T_JSON_DICT, T_JSON_DICT, typing.List[str]])r|r
ccs<tƒ}|dk    r| ¡|d<d|dœ}|V}dd„|dDƒS)zÌ
    Returns all let, const and class variables from global scope.
 
    :param execution_context_id: *(Optional)* Specifies in which execution context to lookup global scope variables.
    :returns: 
    NrƒzRuntime.globalLexicalScopeNamesršcSsg|] }t|ƒ‘qSr r-rJr r rrM_sz.global_lexical_scope_names.<locals>.<listcomp>Únames©r+r)r|rœr rr r rÚglobal_lexical_scope_namesNs     þrÊz8typing.Generator[T_JSON_DICT, T_JSON_DICT, RemoteObject])Úprototype_object_idr¦r
ccs@tƒ}| ¡|d<|dk    r"||d<d|dœ}|V}t |d¡S)zÝ
    :param prototype_object_id: Identifier of the prototype to return objects for.
    :param object_group: *(Optional)* Symbolic group name that can be used to release the results.
    :returns: Array with objects.
    ZprototypeObjectIdNr¬zRuntime.queryObjectsršZobjects)r+rr1r)rËr¦rœr rr r rÚ query_objectsbs     þrÌ)r(r
ccs&tƒ}| ¡|d<d|dœ}|V}dS)zk
    Releases remote object with given id.
 
    :param object_id: Identifier of the object to release.
    r*zRuntime.releaseObjectršNrÉ)r(rœr rr r rÚrelease_objectws  þrÍ)r¦r
ccs"tƒ}||d<d|dœ}|V}dS)zy
    Releases all remote objects that belong to a given group.
 
    :param object_group: Symbolic object group name.
    r¬zRuntime.releaseObjectGroupršN©r+)r¦rœr rr r rÚrelease_object_groupˆs þrÏccsddi}|V}dS)zS
    Tells inspected instance to run if it was waiting for debugger to attach.
    r›zRuntime.runIfWaitingForDebuggerNr rµr r rÚrun_if_waiting_for_debugger™sÿrÐ)    rvr|r¦r¤r¹r–r—r¡r
c cs¾tƒ}| ¡|d<|dk    r&| ¡|d<|dk    r6||d<|dk    rF||d<|dk    rV||d<|dk    rf||d<|dk    rv||d<|dk    r†||d    <d
|d œ}    |    V}
t |
d ¡d |
kr¸t |
d ¡ndfS)aÇ
    Runs script with given id in a given context.
 
    :param script_id: Id of the script to run.
    :param execution_context_id: *(Optional)* Specifies in which execution context to perform script run. If the parameter is omitted the evaluation will be performed in the context of the inspected page.
    :param object_group: *(Optional)* Symbolic group name that can be used to release multiple objects.
    :param silent: *(Optional)* In silent mode exceptions thrown during evaluation are not reported and do not pause execution. Overrides ```setPauseOnException```` state.
    :param include_command_line_api: *(Optional)* Determines whether Command Line API should be available during the evaluation.
    :param return_by_value: *(Optional)* Whether the result is expected to be a JSON object which should be sent by value.
    :param generate_preview: *(Optional)* Whether preview should be generated for the result.
    :param await_promise: *(Optional)* Whether execution should ````await``` for resulting value and return once awaited promise is resolved.
    :returns: A tuple with the following items:
 
        0. **result** - Run result.
        1. **exceptionDetails** - *(Optional)* Exception details.
    rNrƒr¬r¤r¿r˜r™r«zRuntime.runScriptršrržrŸ) rvr|r¦r¤r¹r–r—r¡rœr rr r rÚ
run_script£s.  þ þrÑrg)Ú    max_depthr
ccs"tƒ}||d<d|dœ}|V}dS)zÈ
    Enables or disables async call stacks tracking.
 
    :param max_depth: Maximum depth of async call stacks. Setting to ```0``` will effectively disable collecting async call stacks (default).
    ZmaxDepthzRuntime.setAsyncCallStackDepthršNrÎ)rÒrœr rr r rÚset_async_call_stack_depthØs þrÓ)Úenabledr
ccs"tƒ}||d<d|dœ}|V}dS)z1
 
 
    **EXPERIMENTAL**
 
    :param enabled:
    rÔz'Runtime.setCustomObjectFormatterEnabledršNrÎ)rÔrœr rr r rÚ#set_custom_object_formatter_enabledés
þrÕ)Úsizer
ccs"tƒ}||d<d|dœ}|V}dS)z.
 
 
    **EXPERIMENTAL**
 
    :param size:
    rÖz$Runtime.setMaxCallStackSizeToCaptureršNrÎ)rÖrœr rr r rÚ"set_max_call_stack_size_to_captureüs
þr×ccsddi}|V}dS)zš
    Terminate current or next JavaScript execution.
    Will cancel the termination when the outer-most script execution ends.
 
    **EXPERIMENTAL**
    r›zRuntime.terminateExecutionNr rµr r rÚterminate_executionsÿrØ)rPr|Úexecution_context_namer
ccsFtƒ}||d<|dk    r"| ¡|d<|dk    r2||d<d|dœ}|V}dS)aA
    If executionContextId is empty, adds binding with the given name on the
    global objects of all inspected contexts, including those created later,
    bindings survive reloads.
    Binding function takes exactly one argument, this argument should be string,
    in case of any other input, function throws an exception.
    Each binding function call produces Runtime.bindingCalled notification.
 
    **EXPERIMENTAL**
 
    :param name:
    :param execution_context_id: *(Optional)* If specified, the binding would only be exposed to the specified execution context. If omitted and ```executionContextName```` is not set, the binding is exposed to all execution contexts of the target. This parameter is mutually exclusive with ````executionContextName````. Deprecated in favor of ````executionContextName```` due to an unclear use case and bugs in implementation (crbug.com/1169639). ````executionContextId```` will be removed in the future.
    :param execution_context_name: **(EXPERIMENTAL)** *(Optional)* If specified, the binding is exposed to the executionContext with matching name, even for contexts created after the binding is added. See also ````ExecutionContext.name```` and ````worldName```` parameter to ````Page.addScriptToEvaluateOnNewDocument````. This parameter is mutually exclusive with ````executionContextId```.
    rPNrƒZexecutionContextNamezRuntime.addBindingršrÉ)rPr|rÙrœr rr r rÚ add_bindings þrÚ)rPr
ccs"tƒ}||d<d|dœ}|V}dS)zÆ
    This method does not remove binding function from global object but
    unsubscribes current runtime agent from Runtime.bindingCalled notifications.
 
    **EXPERIMENTAL**
 
    :param name:
    rPzRuntime.removeBindingršNrÎ)rPrœr rr r rÚremove_binding<s þrÛzMtyping.Generator[T_JSON_DICT, T_JSON_DICT, typing.Optional[ExceptionDetails]])Úerror_object_idr
ccs<tƒ}| ¡|d<d|dœ}|V}d|kr8t |d¡SdS)a•
    This method tries to lookup and populate exception details for a
    JavaScript Error object.
    Note that the stackTrace portion of the resulting exceptionDetails will
    only be populated if the Runtime domain was enabled at the time when the
    Error was thrown.
 
    **EXPERIMENTAL**
 
    :param error_object_id: The error object for which to resolve the exception details.
    :returns: 
    Z errorObjectIdzRuntime.getExceptionDetailsršržNrÆ)rÜrœr rr r rÚget_exception_detailsPs þrÝzRuntime.bindingCalledc@s>eZdZUdZded<ded<ded<edddœd    d
„ƒZd S) Ú BindingCalledzY
    **EXPERIMENTAL**
 
    Notification is issued every time when binding is called.
    rrPÚpayloadrfr|rrcCs(|t|dƒt|dƒt |d¡dS)NrPrßrƒ)rPrßr|)rrfrrr r rrvs
 
 
 ýzBindingCalled.from_jsonN©rrrr r.r!rr r r rrÞis
rÞzRuntime.consoleAPICalledc@sVeZdZUdZded<ded<ded<ded    <d
ed <d ed <edddœdd„ƒZdS)ÚConsoleAPICalledz-
    Issued when console API was called.
    rr$ztyping.List[RemoteObject]Úargsrfr|r†Ú    timestamprxryr'Úcontextrrc    Csh|t|dƒdd„|dDƒt |d¡t |d¡d|krJt |d¡ndd|kr`t|dƒndd    S)
Nr)cSsg|]}t |¡‘qSr )r1rrJr r rrMšsz.ConsoleAPICalled.from_json.<locals>.<listcomp>rârƒrãr‚rä)r$râr|rãryrä)rrfrr†r…rr r rr–s
  úzConsoleAPICalled.from_jsonNràr r r rrás
rázRuntime.exceptionRevokedc@s6eZdZUdZded<ded<edddœdd    „ƒZd
S) ÚExceptionRevokedz6
    Issued when unhandled exception was revoked.
    rÚreasonrgrrrrcCs|t|dƒt|dƒdS)Nrær~)rærr)rrgrr r rr­s
 
þzExceptionRevoked.from_jsonNràr r r rrå¢s
 
råzRuntime.exceptionThrownc@s6eZdZUdZded<ded<edddœdd    „ƒZd
S) ÚExceptionThrownz9
    Issued when exception was thrown and unhandled.
    r†rãrqÚexception_detailsrrcCs |t |d¡t |d¡dS)Nrãrž)rãrè)r†rrqrr r rr¿s  þzExceptionThrown.from_jsonNràr r r rrçµs
 
rçzRuntime.executionContextCreatedc@s.eZdZUdZded<edddœdd„ƒZdS)    ÚExecutionContextCreatedz7
    Issued when new execution context is created.
    rhrärrcCs|t |d¡dS)Nrä)rä)rhrrr r rrÐs ÿz!ExecutionContextCreated.from_jsonNràr r r rréÇs
réz!Runtime.executionContextDestroyedc@s6eZdZUdZded<ded<edddœdd    „ƒZd
S) ÚExecutionContextDestroyedz5
    Issued when execution context is destroyed.
    rfr|rÚexecution_context_unique_idrrcCs|t |d¡t|dƒdS)NrƒZexecutionContextUniqueId)r|rë)rfrrrr r rrâs 
þz#ExecutionContextDestroyed.from_jsonNràr r r rrê×s
 
rêz Runtime.executionContextsClearedc@s$eZdZdZedddœdd„ƒZdS)ÚExecutionContextsClearedzC
    Issued when all executionContexts were cleared in browser
    rrcCs|ƒSr r rr r rròsz"ExecutionContextsCleared.from_jsonN)rrrr r!rr r r rrìêsrìzRuntime.inspectRequestedc@s>eZdZUdZded<ded<ded<eddd    œd
d „ƒZd S) ÚInspectRequestedzs
    Issued when object should be inspected (for example, as a result of inspect() command line API
    call).
    r1Úobject_r+Úhintsr{r|rrcCs6|t |d¡t|dƒd|kr.t |d¡nddS)NÚobjectrïrƒ)rîrïr|)r1rr+rfrr r rrs
 
ýzInspectRequested.from_jsonNràr r r rríùs
rí)NN) NNNNNNNNNNNN)N)NNNNNNNNNNNNNNN)NNNN)N)N)NNNNNNN)NN)AÚ
__future__rÚutilrrZ dataclassesrÚenumÚtypingrrr#r/r0r1rAr@rNrOrTrbrdrergrfrhrqr‡r†rˆr‰r…r’r‘r¡r°r´r¶r·r¸rÀrÁrÂrÇrÊrÌrÍrÏrÐrÑrÓrÕr×rØrÚrÛrÝrÞrárårçrérêrìrír r r rÚ<module>s
  K/'K'!+I'&ý#ó*Nü#
 
ð0Uû/ÿþ ø 5ý !