@@ -2537,7 +2537,7 @@ async def screenshot(
25372537 path: typing.Union[str, pathlib.Path] = None,
25382538 quality: int = None,
25392539 omit_background: bool = None,
2540- disable_animations: bool = None,
2540+ animations: Literal["disabled"] = None,
25412541 mask: typing.List["Locator"] = None
25422542 ) -> bytes:
25432543 """ElementHandle.screenshot
@@ -2563,9 +2563,11 @@ async def screenshot(
25632563 omit_background : Union[bool, NoneType]
25642564 Hides default white background and allows capturing screenshots with transparency. Not applicable to `jpeg` images.
25652565 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.
25692571 mask : Union[List[Locator], NoneType]
25702572 Specify locators that should be masked when the screenshot is taken. Masked elements will be overlayed with a pink box
25712573 `#FF00FF` that completely covers its bounding box.
@@ -2584,7 +2586,7 @@ async def screenshot(
25842586 path=path,
25852587 quality=quality,
25862588 omitBackground=omit_background,
2587- disableAnimations=disable_animations ,
2589+ animations=animations ,
25882590 mask=mapping.to_impl(mask),
25892591 ),
25902592 )
@@ -8054,7 +8056,7 @@ async def screenshot(
80548056 omit_background: bool = None,
80558057 full_page: bool = None,
80568058 clip: FloatRect = None,
8057- disable_animations: bool = None,
8059+ animations: Literal["disabled"] = None,
80588060 mask: typing.List["Locator"] = None
80598061 ) -> bytes:
80608062 """Page.screenshot
@@ -8082,9 +8084,11 @@ async def screenshot(
80828084 `false`.
80838085 clip : Union[{x: float, y: float, width: float, height: float}, NoneType]
80848086 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.
80888092 mask : Union[List[Locator], NoneType]
80898093 Specify locators that should be masked when the screenshot is taken. Masked elements will be overlayed with a pink box
80908094 `#FF00FF` that completely covers its bounding box.
@@ -8105,7 +8109,7 @@ async def screenshot(
81058109 omitBackground=omit_background,
81068110 fullPage=full_page,
81078111 clip=clip,
8108- disableAnimations=disable_animations ,
8112+ animations=animations ,
81098113 mask=mapping.to_impl(mask),
81108114 ),
81118115 )
@@ -10431,7 +10435,6 @@ async def grant_permissions(
1043110435 - `'midi'`
1043210436 - `'midi-sysex'` (system-exclusive midi)
1043310437 - `'notifications'`
10434- - `'push'`
1043510438 - `'camera'`
1043610439 - `'microphone'`
1043710440 - `'background-sync'`
@@ -13342,7 +13345,7 @@ async def screenshot(
1334213345 path: typing.Union[str, pathlib.Path] = None,
1334313346 quality: int = None,
1334413347 omit_background: bool = None,
13345- disable_animations: bool = None,
13348+ animations: Literal["disabled"] = None,
1334613349 mask: typing.List["Locator"] = None
1334713350 ) -> bytes:
1334813351 """Locator.screenshot
@@ -13368,9 +13371,11 @@ async def screenshot(
1336813371 omit_background : Union[bool, NoneType]
1336913372 Hides default white background and allows capturing screenshots with transparency. Not applicable to `jpeg` images.
1337013373 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.
1337413379 mask : Union[List[Locator], NoneType]
1337513380 Specify locators that should be masked when the screenshot is taken. Masked elements will be overlayed with a pink box
1337613381 `#FF00FF` that completely covers its bounding box.
@@ -13389,7 +13394,7 @@ async def screenshot(
1338913394 path=path,
1339013395 quality=quality,
1339113396 omitBackground=omit_background,
13392- disableAnimations=disable_animations ,
13397+ animations=animations ,
1339313398 mask=mapping.to_impl(mask),
1339413399 ),
1339513400 )
0 commit comments