Merge pull request #17172 from whimboo/webdriver-bidi

Switch Puppeteer tests from CDP to WebDriver BiDi
This commit is contained in:
calixteman 2023-12-08 23:02:37 +01:00 committed by GitHub
commit 07aa706f1c
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -937,6 +937,10 @@ async function startBrowser({ browserName, headless, startUrl }) {
}
if (browserName === "firefox") {
// Run tests with the WebDriver BiDi protocol enabled only for Firefox for
// now given that for Chrome further fixes are needed first.
options.protocol = "webDriverBiDi";
options.extraPrefsFirefox = {
// avoid to have a prompt when leaving a page with a form
"dom.disable_beforeunload": true,
@ -1052,9 +1056,6 @@ async function closeSession(browser) {
continue;
}
if (session.browser !== undefined) {
for (const page of await session.browser.pages()) {
await page.close();
}
await session.browser.close();
}
session.closed = true;