Skip to content

Commit

Permalink
Merge pull request #17172 from whimboo/webdriver-bidi
Browse files Browse the repository at this point in the history
Switch Puppeteer tests from CDP to WebDriver BiDi
  • Loading branch information
calixteman authored Dec 8, 2023
2 parents 1510360 + d04d28a commit 07aa706
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions test/test.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down Expand Up @@ -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;
Expand Down

0 comments on commit 07aa706

Please sign in to comment.