JavaScript browser automation libraries

Updated Nov 2026

JavaScript browser automation libraries control a web browser from code to open pages, click, type, and read content. Each command travels to the browser over a protocol such as WebDriver BiDi or the Chrome DevTools Protocol. These libraries run end-to-end tests, scrape pages that need JavaScript, and give AI agents a browser they can operate.

Popularity

playwright-core has the most monthly downloads in this comparison, at 712.5M.

LibraryMonthly downloadsStarsLast releaseLicense
playwright-core
712.5M
100.6KNov 2026Apache-2.0
puppeteer-core
127.0M
95.9KNov 2026Apache-2.0
WebDriver
13.2M
9.9KNov 2026MIT
webdriverio
12.8M
9.9KNov 2026MIT
chrome-remote-interface
12.5M
4.6KFeb 2026MIT
Stagehand
10.2M
26.1KNov 2026MIT
selenium-webdriver
8.2M
34.6KNov 2026Apache-2.0
testcafe
853.8K
9.9KOct 2026MIT
Downloads: npm, last thirty days. Stars and releases: GitHub. Amber: no release in over a year.

Libraries and code examples

playwright-core

Drives web browsers through a high-level API, without the Playwright Test runner.

Downloads / mo
712.5M
Stars
100.6K
Last release
1.65.1
License
Apache-2.0

Quickstart

From Playwright docs
$ npm install playwright-core
import { chromium } from "playwright-core";

const browser = await chromium.launch();
const page = await browser.newPage();
await page.goto("https://example.com");
console.log(await page.title());
await browser.close();

playwright-core examples

From open-source projects on GitHub

puppeteer-core

Controls Chrome over the DevTools Protocol through a high-level API, with the browser installed separately.

Downloads / mo
127.0M
Stars
95.9K
Last release
25.18.1
License
Apache-2.0

Quickstart

From Puppeteer docs
$ npm install puppeteer-core
import puppeteer from "puppeteer-core";

const browser = await puppeteer.launch({ channel: "chrome" });
const page = await browser.newPage();
await page.goto("https://example.com");
console.log(await page.title());
await browser.close();

puppeteer-core examples

From open-source projects on GitHub

Implements the WebDriver and WebDriver BiDi protocols for Node.js.

Downloads / mo
13.2M
Stars
9.9K
Last release
10.2.0
License
MIT

Quickstart

From npm registry
$ npm install webdriver
import WebDriver from "webdriver";

const browser = await WebDriver.newSession({
  capabilities: { browserName: "chrome" },
});
await browser.navigateTo("https://example.com");
console.log(await browser.getTitle());
await browser.deleteSession();

WebDriver examples

From open-source projects on GitHub
static attachToSession(sessionId, serverOpts, capabilities = {}) {
    if (!sessionId) {
      throw new Error("Can't attach to a session without a session id");
    }
    const safeServerOpts = {sessionId, ...DEFAULT_SERVER_PROPS, ...serverOpts, capabilities};
    const sessionClient = webdriver.attachToSession(safeServerOpts);
    return new WDSessionDriver(sessionClient);
  }

Adds browser convenience commands and automatic interaction waits over WebDriver protocols.

Downloads / mo
12.8M
Stars
9.9K
Last release
10.2.0
License
MIT

Strengths

  • Waits before element interactions. Click and setValue wait for visible, interactable elements.
  • Works as a standalone library. Use browser commands from ordinary Node scripts without the test runner.

Limitations

  • Network mocks require BiDi. Choose a local browser or remote provider that supports WebDriver BiDi.

Quickstart

From README.md
$ npm install webdriverio
import { remote } from "webdriverio";

const browser = await remote({ capabilities: { browserName: "chrome" } });
await browser.url("https://example.com");
console.log(await browser.getTitle());
await browser.deleteSession();

webdriverio examples

From open-source projects on GitHub

chrome-remote-interface

Sends Chrome DevTools Protocol commands to a running Chrome target.

Downloads / mo
12.5M
Stars
4.6K
Last release
0.34.0
License
MIT

Quickstart

From README.md
$ npm install chrome-remote-interface
import CDP from "chrome-remote-interface";

const client = await CDP();
const { Page, Runtime } = client;
await Page.enable();
const loaded = Page.loadEventFired();
await Page.navigate({ url: "https://example.com" });
await loaded;
const { result } = await Runtime.evaluate({ expression: "document.title" });
console.log(result.value);
await client.close();

chrome-remote-interface examples

From open-source projects on GitHub

Stagehand

Builds browser agents on Browserbase's SDK, with model-guided page actions.

Downloads / mo
10.2M
Stars
26.1K
Last release
4.4.0
License
MIT

Quickstart

From README.md
$ npm install @browserbasehq/stagehand
import { localBrowser, Stagehand } from "@browserbasehq/stagehand";

const browser = await localBrowser.launch({ userDataDir: "./browser-data" });
const stagehand = await Stagehand.create({
  browser,
  model: { modelName: "openai/gpt-5.4-mini", apiKey: process.env.OPENAI_API_KEY },
});
const [page] = await browser.context.pages();
await page.goto("https://example.com");
const { data } = await stagehand.observe("find the main heading");
console.log(data);
await stagehand.close();
await browser.close();

selenium-webdriver

Provides JavaScript bindings for local and remote WebDriver browser automation.

Downloads / mo
8.2M
Stars
34.6K
Last release
4.53.0
License
Apache-2.0

Strengths

  • Configures different installed browsers. Use Builder to choose the browser and apply its options.
  • Connects to remote WebDriver servers. Point Builder at Selenium Grid or a standalone server.

Limitations

  • Loaded pages can still change. Wait for the element or condition the next action requires.

Quickstart

From npm registry
$ npm install selenium-webdriver
const { Builder, Browser } = require("selenium-webdriver");

(async function main() {
  const driver = await new Builder().forBrowser(Browser.CHROME).build();
  try {
    await driver.get("https://example.com");
    console.log(await driver.getTitle());
  } finally {
    await driver.quit();
  }
})();

selenium-webdriver examples

From open-source projects on GitHub

Runs automated browser tests for web applications.

Downloads / mo
853.8K
Stars
9.9K
Last release
3.7.7
License
MIT

Quickstart

From npm registry
$ npm install testcafe
fixture `Example`.page `https://devexpress.github.io/testcafe/example`;

test('type a name', async t => {
  await t.typeText('#developer-name', 'Ada');
});

testcafe examples

From open-source projects on GitHub

FAQ

Playwright locators wait until an element is ready before acting. Selenium WebDriver leaves waits to the test code and drives browsers through the WebDriver protocol, locally or on Selenium Grid.

Puppeteer controls Chrome and Firefox and can attach to a running browser endpoint. Playwright drives several browsers through one API and checks each element's actionability before an action.

Stagehand adds model-guided actions, where a language model decides how to act on the page. Playwright runs only the actions the code specifies.

Locators wait for the element to be present and in the right state for the action. The checks include viewport, visibility, enabled state, and a stable bounding box.

The connecting client and browser-launching Playwright instance must have matching major and minor versions.

Network mocking in WebdriverIO requires WebDriver BiDi support in the browser or remote provider.

For coding agents

Found your browser automation library? Help your agent use it.

Connect Exa so your coding agent can find the library’s documentation, check its API, and look up implementations while you build.

Run in your terminal

claude plugin install exa@claude-plugins-official