fix: deprecate CDP for Firefox (#12349)

This commit is contained in:
Alex Rudenko 2024-05-02 10:28:01 +02:00 committed by GitHub
parent 533f83af5a
commit dffad28a42
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -112,6 +112,18 @@ export abstract class ProductLauncher {
});
};
if (
this.#product === 'firefox' &&
protocol !== 'webDriverBiDi' &&
this.puppeteer.configuration.logLevel === 'warn'
) {
console.warn(
`Chrome DevTools Protocol (CDP) support for Firefox is deprecated in Puppeteer ` +
`and it will be eventually removed. ` +
`Use WebDriver BiDi instead (see https://pptr.dev/webdriver-bidi#get-started).`
);
}
const browserProcess = launch({
executablePath: launchArgs.executablePath,
args: launchArgs.args,