diff --git a/src/client/crxConnection.ts b/src/client/crxConnection.ts index 86a565ebd..f00675ec6 100644 --- a/src/client/crxConnection.ts +++ b/src/client/crxConnection.ts @@ -22,6 +22,7 @@ import { findValidator } from 'playwright-core/lib/protocol/validatorPrimitives' export class CrxConnection extends Connection { constructor() { super(undefined, undefined); + this.useRawBuffers(); } dispatch(message: object): void { diff --git a/tests/crx/api.spec.ts b/tests/crx/api.spec.ts index 89de85387..f061e7376 100644 --- a/tests/crx/api.spec.ts +++ b/tests/crx/api.spec.ts @@ -162,3 +162,13 @@ test('should not block on pages with service workers', async ({ runCrxTest }) => await expect(page.evaluate(() => window['registrationPromise'])).resolves.toBeTruthy(); }); }); + +// https://github.com/ruifigueira/playwright-crx/issues/14 +test("should take screenshot", async ({ runCrxTest }) => { + await runCrxTest(async ({ expect, page }) => { + await page.goto('about:blank'); + await page.setContent('