zmc
2023-08-08 e792e9a60d958b93aef96050644f369feb25d61b
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
U
[±d·ã@sœddlmZddlmZmZddlmZddlZddlZeGdd„dƒƒZ    dddd    d
d d œd d„Z
ddœdd„Z ddœdd„Z edƒeGdd„dƒƒƒZ dS)é)Ú annotationsé)Ú event_classÚ T_JSON_DICT)Ú    dataclassNc@s>eZdZUdZdZded<dZded<dd„Zed    d
„ƒZ    dS) ÚScreenshotParamsz,
    Encoding options for a screenshot.
    Nztyping.Optional[str]Úformat_ztyping.Optional[int]ÚqualitycCs2tƒ}|jdk    r|j|d<|jdk    r.|j|d<|S)NÚformatr    )Údictrr    )ÚselfÚjson©rúsd:\z\workplace\vscode\pyvenv\venv\Lib\site-packages\selenium/webdriver/common/devtools/v85/headless_experimental.pyÚto_jsons 
 
 
 
zScreenshotParams.to_jsoncCs4|d|krt|dƒndd|kr,t|dƒnddS)Nr
r    )rr    )ÚstrÚint©Úclsr rrrÚ    from_json sþzScreenshotParams.from_json)
Ú__name__Ú
__module__Ú __qualname__Ú__doc__rÚ__annotations__r    rÚ classmethodrrrrrr s
  rztyping.Optional[float]ztyping.Optional[bool]z!typing.Optional[ScreenshotParams]zTtyping.Generator[T_JSON_DICT, T_JSON_DICT, typing.Tuple[bool, typing.Optional[str]]])Úframe_time_ticksÚintervalÚno_display_updatesÚ
screenshotÚreturnccs~tƒ}|dk    r||d<|dk    r&||d<|dk    r6||d<|dk    rJ| ¡|d<d|dœ}|V}t|dƒd    |krxt|d    ƒndfS)
ay
    Sends a BeginFrame to the target and returns when the frame was completed. Optionally captures a
    screenshot from the resulting frame. Requires that the target was created with enabled
    BeginFrameControl. Designed for use with --run-all-compositor-stages-before-draw, see also
    https://goo.gl/3zHXhB for more background.
 
    :param frame_time_ticks: *(Optional)* Timestamp of this BeginFrame in Renderer TimeTicks (milliseconds of uptime). If not set, the current time will be used.
    :param interval: *(Optional)* The interval between BeginFrames that is reported to the compositor, in milliseconds. Defaults to a 60 frames/second interval, i.e. about 16.666 milliseconds.
    :param no_display_updates: *(Optional)* Whether updates should not be committed and drawn onto the display. False by default. If true, only side effects of the BeginFrame will be run, such as layout and animations, but any visual updates may not be visible on the display or in screenshots.
    :param screenshot: *(Optional)* If set, a screenshot of the frame will be captured and returned in the response. Otherwise, no screenshot will be captured. Note that capturing a screenshot can fail, for example, during renderer initialization. In such a case, no screenshot data will be returned.
    :returns: A tuple with the following items:
 
        0. **hasDamage** - Whether the BeginFrame resulted in damage and, thus, a new frame was committed to the display. Reported for diagnostic uses, may be removed in the future.
        1. **screenshotData** - *(Optional)* Base64-encoded image data of the screenshot, if one was requested and successfully taken.
    NZframeTimeTicksrZnoDisplayUpdatesrzHeadlessExperimental.beginFrame)ÚmethodÚparamsZ    hasDamageZscreenshotData)r rÚboolr)rrrrr"Úcmd_dictr rrrÚ begin_frame(s  þ
þr%z0typing.Generator[T_JSON_DICT, T_JSON_DICT, None])r ccsddi}|V}dS)z2
    Disables headless events for the target.
    r!zHeadlessExperimental.disableNr©r$r rrrÚdisableQsÿr'ccsddi}|V}dS)z1
    Enables headless events for the target.
    r!zHeadlessExperimental.enableNrr&rrrÚenable[sÿr(z,HeadlessExperimental.needsBeginFramesChangedc@s.eZdZUdZded<edddœdd„ƒZdS)    ÚNeedsBeginFramesChangedzÏ
    Issued when the target starts or stops needing BeginFrames.
    Deprecated. Issue beginFrame unconditionally instead and use result from
    beginFrame to detect whether the frames were suppressed.
    r#Úneeds_begin_framesr)r r cCs|t|dƒdS)NZneedsBeginFrames)r*)r#rrrrrps
ÿz!NeedsBeginFramesChanged.from_jsonN)rrrrrrrrrrrr)es
r))NNNN)Ú
__future__rÚutilrrZ dataclassesrÚenumÚtypingrr%r'r(r)rrrrÚ<module>s   ü)