Skip to content

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

test(bidi): update expected error message for large screenshots (#40588)

Holger Benl91007721d1fd
diff --git a/tests/page/page-screenshot.spec.ts b/tests/page/page-screenshot.spec.ts
index 00a58c99f5..a2f7b77b3c 100644
--- a/tests/page/page-screenshot.spec.ts
+++ b/tests/page/page-screenshot.spec.ts
@@ -905,7 +905,7 @@ it('should throw if screenshot size is too large', async ({ page, browserName, i
if ((browserName === 'firefox' && !isBidi) || (browserName === 'webkit' && !isMac))
expect(exception.message).toContain('Cannot take screenshot larger than 32767');
else if (browserName === 'firefox' && isBidi)
- expect(exception.message).toContain('Unable to capture screenshot');
+ expect(exception.message).toContain('65536 exceeds the maximum allowed screenshot height of 65535 pixels');
}
});