(Created on )

Puppeteer: BiDi does not support 'optimizeForSpeed'.

BiDi screenshots reject optimizeForSpeed: true.


BiDi screenshots reject optimizeForSpeed: true.

Error message

BiDi does not support 'optimizeForSpeed'.

How this error happens

The selected page uses WebDriver BiDi, but the screenshot call requests a setting that this implementation rejects.

Use a page named page from a browser connected with protocol: "webDriverBiDi".

await page.screenshot({
    optimizeForSpeed: true,
});

How to fix

Omit the CDP-specific speed optimization when using BiDi.

await page.screenshot({
    type: "png",
});

Things to keep in mind

Removing this option changes the encoding optimization, not the requested page content.

All Puppeteer errors

Keep Reading

Puppeteer Guides

All Guides →