<titledata-rh="true">Experimental WebDriver BiDi support | Puppeteer</title><metadata-rh="true"name="viewport"content="width=device-width,initial-scale=1"><metadata-rh="true"name="twitter:card"content="summary_large_image"><metadata-rh="true"property="og:url"content="https://pptr.dev/webdriver-bidi"><metadata-rh="true"property="og:locale"content="en"><metadata-rh="true"name="docsearch:language"content="en"><metadata-rh="true"name="docsearch:counter"content="2"><metadata-rh="true"property="og:title"content="Experimental WebDriver BiDi support | Puppeteer"><metadata-rh="true"name="description"content="WebDriver BiDi is a new cross-browser"><metadata-rh="true"property="og:description"content="WebDriver BiDi is a new cross-browser"><linkdata-rh="true"rel="icon"href="/img/favicon.ico"><linkdata-rh="true"rel="canonical"href="https://pptr.dev/webdriver-bidi"><linkdata-rh="true"rel="alternate"href="https://pptr.dev/webdriver-bidi"hreflang="en"><linkdata-rh="true"rel="alternate"href="https://pptr.dev/webdriver-bidi"hreflang="x-default"><linkdata-rh="true"rel="preconnect"href="https://DVKY664LG7-dsn.algolia.net"crossorigin="anonymous"><linkrel="search"type="application/opensearchdescription+xml"title="Puppeteer"href="/opensearch.xml">
automation protocol currently under development, aiming to combine the best of both WebDriver “Classic” and CDP. WebDriver BiDi promises bi-directional communication, making it fast by default, and it comes packed with low-level control.</p>
<li><ahref="https://developer.chrome.com/articles/webdriver-bidi/"target="_blank"rel="noopener noreferrer">WebDriver BiDi - The future of cross-browser automation</a></li>
<li><ahref="https://developer.chrome.com/blog/webdriver-bidi-2023/"target="_blank"rel="noopener noreferrer">WebDriver BiDi: 2023 status update</a></li>
</ul>
<h2class="anchor anchorWithStickyNavbar_LWe7"id="automate-with-chrome-and-firefox">Automate with Chrome and Firefox<ahref="#automate-with-chrome-and-firefox"class="hash-link"aria-label="Direct link to Automate with Chrome and Firefox"title="Direct link to Automate with Chrome and Firefox"></a></h2>
<p>Puppeteer supports WebDriver BiDi automation with Chrome and Firefox.</p>
<p>Firefox integration is nearing feature parity with its previous CDP-based approach. Learn more in the <ahref="https://hacks.mozilla.org/2023/12/puppeteer-webdriver-bidi/"target="_blank"rel="noopener noreferrer">dedicated announcement</a>.</p>
<h2class="anchor anchorWithStickyNavbar_LWe7"id="measuring-progress">Measuring progress<ahref="#measuring-progress"class="hash-link"aria-label="Direct link to Measuring progress"title="Direct link to Measuring progress"></a></h2>
<p>To gauge the capabilities of WebDriver BiDi, we utilized the comprehensive <ahref="https://puppeteer.github.io/ispuppeteerwebdriverbidiready/"target="_blank"rel="noopener noreferrer">Puppeteer test suite</a></p>
<ul>
<li>For Firefox, there are currently under <ahref="https://puppeteer.github.io/ispuppeteerwebdriverbidiready/firefox-delta.json"target="_blank"rel="noopener noreferrer">60</a> failing tests compared to the CDP implementation, while over <ahref="https://puppeteer.github.io/ispuppeteerwebdriverbidiready/firefox-delta.json"target="_blank"rel="noopener noreferrer">82</a> new tests successfully utilize WebDriver BiDi, demonstrating its growing potential.</li>
<li>For Chrome, around 68% of tests pass with WebDriver BiDi, indicating room for improvement compared to the CDP-based approach.</li>
</ul>
<h2class="anchor anchorWithStickyNavbar_LWe7"id="get-started">Get started<ahref="#get-started"class="hash-link"aria-label="Direct link to Get started"title="Direct link to Get started"></a></h2>
<p>Below is an example of launching Firefox or Chrome with WebDriver BiDi:</p>
<p>This is an exciting step towards a more unified and efficient cross-browser automation experience. We encourage you to explore WebDriver BiDi with Puppeteer and join us in shaping the future of browser automation.</p>
<h2class="anchor anchorWithStickyNavbar_LWe7"id="puppeteer-features-supported-over-webdriver-bidi">Puppeteer features supported over WebDriver BiDi<ahref="#puppeteer-features-supported-over-webdriver-bidi"class="hash-link"aria-label="Direct link to Puppeteer features supported over WebDriver BiDi"title="Direct link to Puppeteer features supported over WebDriver BiDi"></a></h2>
<ul>
<li>
<p>Browser and page automation</p>
<ul>
<li>Browser.close</li>
<li>Frame.goto() (except <code>referer</code> and <code>referrerPolicy</code>)</li>
<li>Page.bringToFront</li>
<li>Page.goBack()</li>
<li>Page.goForward()</li>
<li>Page.goto (except <code>referer</code> and <code>referrerPolicy</code>)</li>
<li>Page.reload (except for <code>ignoreCache</code> parameter)</li>
<p><ahref="https://pptr.dev/guides/query-selectors"target="_blank"rel="noopener noreferrer">Selectors</a> and <ahref="https://pptr.dev/guides/locators"target="_blank"rel="noopener noreferrer">locators</a> except for ARIA:</p>
<ul>
<li>Page.$ (ARIA selectors supported in Chrome)</li>
<li>Page.$$ (ARIA selectors supported in Chrome)</li>
<li>Page.$$eval (ARIA selectors supported in Chrome)</li>
<li>Page.$eval (ARIA selectors supported in Chrome)</li>
<li>Page.waitForSelector (ARIA selectors supported in Chrome)</li>
</ul>
</li>
<li>
<p>Input</p>
<ul>
<li>ElementHandle.click</li>
<li>Keyboard.down</li>
<li>Keyboard.press</li>
<li>Keyboard.sendCharacter</li>
<li>Keyboard.type</li>
<li>Keyboard.up</li>
<li>Mouse events (except for dedicated drag'n'drop API methods)</li>
<li>Page.tap</li>
<li>TouchScreen.*</li>
</ul>
</li>
<li>
<p>JavaScript dialog interception</p>
<ul>
<li>page.on('dialog')</li>
<li>Dialog.*</li>
</ul>
</li>
<li>
<p>Screenshots (not all parameters are supported)</p>
<h2class="anchor anchorWithStickyNavbar_LWe7"id="puppeteer-features-not-yet-supported-over-webdriver-bidi">Puppeteer features not yet supported over WebDriver BiDi<ahref="#puppeteer-features-not-yet-supported-over-webdriver-bidi"class="hash-link"aria-label="Direct link to Puppeteer features not yet supported over WebDriver BiDi"title="Direct link to Puppeteer features not yet supported over WebDriver BiDi"></a></h2>