Skip to content

Playwright is a framework for Web Testing and Automation. It allows testing Chromium, Firefox and WebKit with a single API.

chore: follow-up to animations default option (#12669)

Andrey Lushnikov65b9cba143aa
diff --git a/packages/playwright-core/src/server/screenshotter.ts b/packages/playwright-core/src/server/screenshotter.ts
index 40b7f96bd2..d6522dc0de 100644
--- a/packages/playwright-core/src/server/screenshotter.ts
+++ b/packages/playwright-core/src/server/screenshotter.ts
@@ -36,7 +36,7 @@ export type ScreenshotOptions = {
type?: 'png' | 'jpeg',
quality?: number,
omitBackground?: boolean,
- animations?: 'disabled',
+ animations?: 'disabled' | 'allow',
mask?: { frame: Frame, selector: string}[],
fullPage?: boolean,
clip?: Rect,
diff --git a/packages/playwright-core/types/types.d.ts b/packages/playwright-core/types/types.d.ts
index ed7f24f26c..6c0b7bc049 100644
--- a/packages/playwright-core/types/types.d.ts
+++ b/packages/playwright-core/types/types.d.ts
@@ -8070,7 +8070,7 @@ export interface ElementHandle<T=Node> extends JSHandle<T> {
* - finite animations are fast-forwarded to completion, so they'll fire `transitionend` event.
* - infinite animations are canceled to initial state, and then played over after the screenshot.
*
- * Defaults to `"allow"`.
+ * Defaults to `"allow"` that leaves animations untouched.
*/
animations?: "disabled"|"allow";
@@ -15600,7 +15600,7 @@ export interface LocatorScreenshotOptions {
* - finite animations are fast-forwarded to completion, so they'll fire `transitionend` event.
* - infinite animations are canceled to initial state, and then played over after the screenshot.
*
- * Defaults to `"allow"`.
+ * Defaults to `"allow"` that leaves animations untouched.
*/
animations?: "disabled"|"allow";
@@ -15753,7 +15753,7 @@ export interface PageScreenshotOptions {
* - finite animations are fast-forwarded to completion, so they'll fire `transitionend` event.
* - infinite animations are canceled to initial state, and then played over after the screenshot.
*
- * Defaults to `"allow"`.
+ * Defaults to `"allow"` that leaves animations untouched.
*/
animations?: "disabled"|"allow";