Puppeteer: CDP support is required for this feature. The current browser does not support CDP.
A requested feature needs CDP but the current browser/protocol has no CDP bridge.
A requested feature needs CDP but the current browser/protocol has no CDP bridge.
Error message
CDP support is required for this feature. The current browser does not support CDP.
How this error happens
Firefox/WebDriver BiDi does not supply Chrome’s CDP feature bridge. A CDP session request asks for a capability that connection does not have.
The snippets use the imported puppeteer instance and installed compatible browsers.
const browser = await puppeteer.launch({
browser: "firefox",
protocol: "webDriverBiDi",
});
const page = await browser.newPage();
await page.createCDPSession();
How to fix
Use Chrome/CDP if the task genuinely needs raw CDP commands.
const browser = await puppeteer.launch({
browser: "chrome",
protocol: "cdp",
});
try {
const page = await browser.newPage();
const session = await page.createCDPSession();
await session.send(
"Runtime.enable"
);
await session.detach();
} finally {
await browser.close();
}
Things to keep in mind
A browser switch changes the engine being tested. If Firefox behavior is the goal, use supported public BiDi operations instead of substituting Chrome.