1 of 9

Towards a shared WebDriver BiDi roadmap

mathias@chromium.org

2 of 9

Motivation

  • Share Chrome’s current roadmap w.r.t. WebDriver BiDi
  • Goal: start a discussion
  • Ideal world: alignment between browser implementers, abstraction authors, and end users on prioritization

3 of 9

Web Platform Tests

4 of 9

Chrome’s current roadmap

5 of 9

Chrome’s current roadmap

  1. Minimal scenario
  2. Hacker News
  3. Google Search
  4. Capturing screenshots
  5. Printing to PDF
  6. Request interception

6 of 9

Chrome’s current roadmap

  • Minimal scenario
  • Hacker News
  • Google Search
  • Capturing screenshots
  • Printing to PDF
  • Request interception

Logging?

Sandboxes?

(Service) workers?

External state emulations?�…

7 of 9

WebDriver BiDi in Puppeteer

alexrudenko@chromium.org

8 of 9

WebDriver BiDi in Puppeteer

  • Experimental, alongside with CDP for a while.
  • Falling back to CDP if a feature is not supported in BiDi.

const browser = await puppeteer.launch({

product: 'chrome'|'firefox'|...,

useWebDriverBidi: true,

});

// browser instanceof WebDriverBiDiBrowser implements Browser

const page = await browser.newPage();

// page instance of WebDriverBiDiPage implements Page

await page.evaluate(() => {});

9 of 9

WebDriver BiDi in Puppeteer

interface Browser {

/**

* Public API and shared documentation

*/

pages(): Promise<Page[]>;

...

}

class CDPBrowser implements Browser {

// Current Browser implementation

}

class WebDriverBiDiBrowser implements Browser {

// BiDi-specific Browser implementation.

// * might throw on some CDP-specific APIs that are not supported in BiDi.

// * Common code can be extracted and re-used between CDP and WebDriver BiDi

// implementations whenever appropriate.

// * Same test suite for CDP and BiDi

// https://github.com/puppeteer/puppeteer/pull/8358

// https://github.com/puppeteer/puppeteer/pull/8492

}