Head to head · Browser automation · October 2026 research run

Puppeteer vs Selenium

Selenium scores 73.6 (BB) on agent readiness against Puppeteer's 70.6 (BB), and leads in 5 of 7 scored categories. Puppeteer leads on security & auth. Both do browser automation.

Best browser automation tools for AI agents · All 120 browser comparisons

Which one, for what

Puppeteer BB

Best for Agents that write and run Node.js scripts against Chrome or Firefox.

Ahead on

  • Security & auth, 52 against 43

Watch for

No MCP server, CLI or llms.txt of its own. The docs point agents to the separate chrome-devtools-mcp project

Selenium BB

Best for Agents that write test or automation scripts in any of five languages, and teams with a Grid.

Ahead on

  • Reliability, 90 against 80
  • Schema & documentation, 89 against 81
  • Maintenance & community, 94 against 89

Watch for

No MCP server from the project. The docs point to community servers and say they are third-party

Score by category

CategoryWeight this runPuppeteerSeleniumEdge
Reliability16%208090Selenium +10
Performance10%pendingpendingpendingnot scored in this run
Schema & documentation13%16.28189Selenium +8
Agent ergonomics13%16.26770Selenium +3
Security & auth14%17.55243Puppeteer +9
Payments & pricing10%12.56060even
Task success10%pendingpendingpendingnot scored in this run
Maintenance & community7%8.88994Selenium +5
Transparency & trust7%8.87074Selenium +4
Negative events≤1500
TotalBB 70.6/100BB 73.6/100

Facts side by side

FactPuppeteerSelenium
KindSDK + MCPSDK + MCP
VendorGoogleSelenium project (Software Freedom Conservancy)
Hosted endpointno (local only)no (local only)
TransportsHTTP
AuthNoneNone
PricingFreeFree
x402nono
LicenceApache-2.0Apache-2.0
Read-only variant documentednono
llms.txtnoyes
Last release2026-10-082026-10-09
Terms last updatedno document linkedno document linked
Privacy policy last updatedno document linkedno document linked
Customer content may train models
Terms restrict automated access
Terms restrict benchmarking
Terms or service can change without notice
Arbitration or class-action waiver
Popularity96k stars, 11.5M npm/wk35k stars, 1.8M npm/wk, 6.9M PyPI/wk

Verdicts

Puppeteer

Puppeteer is a stable, Apache-2.0 library on 25.13.0, with ten releases since 27 July 2026, typed APIs, locators that wait and retry, and accessibility snapshots an agent can read. It has no MCP server or llms.txt of its own, and 10 of the 20 most recent CI runs on main failed between 7 and 13 October 2026.

Selenium

Selenium is stable, Apache-2.0 software on 4.51.0 with bindings in five languages, CI passing on trunk, an llms.txt and an agent guide added in September 2026. It has no MCP server of its own, Selenium Manager sends usage statistics by default, and Grid accepts unauthenticated sessions unless a username and password are set.

Before you call either

Puppeteer

  1. Install with npm i puppeteer, which downloads a matching Chrome for Testing. Use puppeteer-core to bring your own browser
  2. Prefer page.locator() over page.$(). Locators wait for the element to be visible and stable before acting
  3. Read pages with page.accessibility.snapshot({interestingOnly: true}) rather than full HTML to keep output short
  4. Catch TimeoutError separately from TargetCloseError. The first can be retried, the second needs a new page or browser
  5. Packages are ESM only since 25.0.0. Use import puppeteer from 'puppeteer' rather than require

Selenium

  1. Install with pip install selenium (Python 3.10 or later) and let Selenium Manager fetch drivers. Do not set driver paths
  2. Use WebDriverWait with expected conditions, never fixed sleeps, and do not mix implicit and explicit waits
  3. Set SE_AVOID_STATS=true to stop Selenium Manager sending usage statistics
  4. Point coding agents at https://www.selenium.dev/llms.txt. Most Selenium 2 and 3 era examples use removed APIs
  5. Set --username and --password before exposing a Grid beyond localhost. Check http://localhost:4444/status before creating sessions

Questions

Which is better for AI agents, Puppeteer or Selenium?

Selenium scores 73.6 (BB) on agent readiness against Puppeteer's 70.6 (BB), and leads in 5 of 7 scored categories. Puppeteer leads on security & auth.

Are Puppeteer and Selenium open source?

Yes. Puppeteer is open source (Apache-2.0). Selenium is open source (Apache-2.0).

Other comparisons with Puppeteer or Selenium

Machine-readable

For companies

Do agents find, use and choose your tools?

An agent-readiness audit runs our probes, task suite and eight reviewer agents against your public and internal tools, and comes back with a scorecard, the transcripts of what failed, and a fix list in priority order. From $2,500, re-run included. We never take payment to move a rank. We do help companies earn one.