@@ -2537,7 +2537,7 @@ async def screenshot(
2537
2537
path: typing.Union[str, pathlib.Path] = None,
2538
2538
quality: int = None,
2539
2539
omit_background: bool = None,
2540
- disable_animations: bool = None,
2540
+ animations: Literal["disabled"] = None,
2541
2541
mask: typing.List["Locator"] = None
2542
2542
) -> bytes:
2543
2543
"""ElementHandle.screenshot
@@ -2563,9 +2563,11 @@ async def screenshot(
2563
2563
omit_background : Union[bool, NoneType]
2564
2564
Hides default white background and allows capturing screenshots with transparency. Not applicable to `jpeg` images.
2565
2565
Defaults to `false`.
2566
- disable_animations : Union[bool, NoneType]
2567
- When true, stops CSS animations, CSS transitions and Web Animations. Animations get different treatment depending on
2568
- their duration:
2566
+ animations : Union["disabled", NoneType]
2567
+ When set to `"disabled"`, stops CSS animations, CSS transitions and Web Animations. Animations get different treatment
2568
+ depending on their duration:
2569
+ - finite animations are fast-forwarded to completion, so they'll fire `transitionend` event.
2570
+ - infinite animations are canceled to initial state, and then played over after the screenshot.
2569
2571
mask : Union[List[Locator], NoneType]
2570
2572
Specify locators that should be masked when the screenshot is taken. Masked elements will be overlayed with a pink box
2571
2573
`#FF00FF` that completely covers its bounding box.
@@ -2584,7 +2586,7 @@ async def screenshot(
2584
2586
path=path,
2585
2587
quality=quality,
2586
2588
omitBackground=omit_background,
2587
- disableAnimations=disable_animations ,
2589
+ animations=animations ,
2588
2590
mask=mapping.to_impl(mask),
2589
2591
),
2590
2592
)
@@ -8054,7 +8056,7 @@ async def screenshot(
8054
8056
omit_background: bool = None,
8055
8057
full_page: bool = None,
8056
8058
clip: FloatRect = None,
8057
- disable_animations: bool = None,
8059
+ animations: Literal["disabled"] = None,
8058
8060
mask: typing.List["Locator"] = None
8059
8061
) -> bytes:
8060
8062
"""Page.screenshot
@@ -8082,9 +8084,11 @@ async def screenshot(
8082
8084
`false`.
8083
8085
clip : Union[{x: float, y: float, width: float, height: float}, NoneType]
8084
8086
An object which specifies clipping of the resulting image. Should have the following fields:
8085
- disable_animations : Union[bool, NoneType]
8086
- When true, stops CSS animations, CSS transitions and Web Animations. Animations get different treatment depending on
8087
- their duration:
8087
+ animations : Union["disabled", NoneType]
8088
+ When set to `"disabled"`, stops CSS animations, CSS transitions and Web Animations. Animations get different treatment
8089
+ depending on their duration:
8090
+ - finite animations are fast-forwarded to completion, so they'll fire `transitionend` event.
8091
+ - infinite animations are canceled to initial state, and then played over after the screenshot.
8088
8092
mask : Union[List[Locator], NoneType]
8089
8093
Specify locators that should be masked when the screenshot is taken. Masked elements will be overlayed with a pink box
8090
8094
`#FF00FF` that completely covers its bounding box.
@@ -8105,7 +8109,7 @@ async def screenshot(
8105
8109
omitBackground=omit_background,
8106
8110
fullPage=full_page,
8107
8111
clip=clip,
8108
- disableAnimations=disable_animations ,
8112
+ animations=animations ,
8109
8113
mask=mapping.to_impl(mask),
8110
8114
),
8111
8115
)
@@ -10431,7 +10435,6 @@ async def grant_permissions(
10431
10435
- `'midi'`
10432
10436
- `'midi-sysex'` (system-exclusive midi)
10433
10437
- `'notifications'`
10434
- - `'push'`
10435
10438
- `'camera'`
10436
10439
- `'microphone'`
10437
10440
- `'background-sync'`
@@ -13342,7 +13345,7 @@ async def screenshot(
13342
13345
path: typing.Union[str, pathlib.Path] = None,
13343
13346
quality: int = None,
13344
13347
omit_background: bool = None,
13345
- disable_animations: bool = None,
13348
+ animations: Literal["disabled"] = None,
13346
13349
mask: typing.List["Locator"] = None
13347
13350
) -> bytes:
13348
13351
"""Locator.screenshot
@@ -13368,9 +13371,11 @@ async def screenshot(
13368
13371
omit_background : Union[bool, NoneType]
13369
13372
Hides default white background and allows capturing screenshots with transparency. Not applicable to `jpeg` images.
13370
13373
Defaults to `false`.
13371
- disable_animations : Union[bool, NoneType]
13372
- When true, stops CSS animations, CSS transitions and Web Animations. Animations get different treatment depending on
13373
- their duration:
13374
+ animations : Union["disabled", NoneType]
13375
+ When set to `"disabled"`, stops CSS animations, CSS transitions and Web Animations. Animations get different treatment
13376
+ depending on their duration:
13377
+ - finite animations are fast-forwarded to completion, so they'll fire `transitionend` event.
13378
+ - infinite animations are canceled to initial state, and then played over after the screenshot.
13374
13379
mask : Union[List[Locator], NoneType]
13375
13380
Specify locators that should be masked when the screenshot is taken. Masked elements will be overlayed with a pink box
13376
13381
`#FF00FF` that completely covers its bounding box.
@@ -13389,7 +13394,7 @@ async def screenshot(
13389
13394
path=path,
13390
13395
quality=quality,
13391
13396
omitBackground=omit_background,
13392
- disableAnimations=disable_animations ,
13397
+ animations=animations ,
13393
13398
mask=mapping.to_impl(mask),
13394
13399
),
13395
13400
)
0 commit comments