From edd789780ac473083f6fb0b8740faddc43b439ab Mon Sep 17 00:00:00 2001 From: Henrik Skupin Date: Thu, 19 Dec 2024 21:26:01 +0100 Subject: [PATCH] WebDriver BiDi: "browsingContext.captureScreenshot" accepts quality from 0 to 1 (#34097) --- packages/playwright-core/src/server/bidi/bidiPage.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/playwright-core/src/server/bidi/bidiPage.ts b/packages/playwright-core/src/server/bidi/bidiPage.ts index 9b501c5484fda..cf0662738b1d4 100644 --- a/packages/playwright-core/src/server/bidi/bidiPage.ts +++ b/packages/playwright-core/src/server/bidi/bidiPage.ts @@ -399,7 +399,7 @@ export class BidiPage implements PageDelegate { context: this._session.sessionId, format: { type: `image/${format === 'png' ? 'png' : 'jpeg'}`, - quality: quality || 80, + quality: quality ? quality / 100 : 0.8, }, origin: documentRect ? 'document' : 'viewport', clip: {