- Home
- /
- Selenium vs Puppeteer
Selenium vs Puppeteer
Selenium and Puppeteer solve different problems: one is the cross-browser W3C WebDriver standard, the other is a fast Chrome-focused automation library. This guide compares them head-to-head on protocol, languages, browser coverage, speed and use cases, with code samples and a verdict you can act on in five minutes.
- Browsers & devices
- 6100+
- Cloud parallelism
- 100×
- Uptime SLA
- 99.99%
Trusted by some of the world's most innovative companies
Which one should you pick?
You need real cross-browser testing across Chrome, Firefox, Safari, Edge and Internet Explorer, more than one language, or real mobile devices through Appium, on a W3C-standard protocol.
You automate Chrome or Chromium from Node.js for fast end-to-end tests, scraping, PDF generation or performance tracing, and you do not need Safari, Internet Explorer or other languages.
You use Puppeteer for fast Chrome-only checks and Selenium for broad cross-browser coverage. TestingBot runs both on the same grid, in parallel, in one dashboard.
What are Selenium and Puppeteer?
Two browser automation tools with different goals. One standardises cross-browser control; the other drives Chrome at speed.
Selenium
Released 2004 · Open Source · Apache 2.0
Selenium is the original browser automation framework and the foundation of the W3C WebDriver standard. Selenium WebDriver drives any browser from the outside through a vendor-supplied driver (chromedriver, geckodriver, safaridriver, edgedriver) using the same wire protocol.
Twenty years of ecosystem maturity means bindings for every major language, deep IDE integration, mature Page Object patterns, and real mobile device testing through Appium, which is built on the same protocol.
- Java / Python / C# / Ruby / JavaScript / Kotlin
- W3C WebDriver standard, works with every browser
- Chrome, Firefox, Safari, Edge, IE 11 · real mobile via Appium
Puppeteer
Released 2017 · Google · Apache 2.0
Puppeteer is a Node.js library from the Google Chrome team that controls Chrome, Chromium and Edge through the Chrome DevTools Protocol. It powers fast end-to-end testing, web scraping, PDF generation and performance tracing.
Because it talks the DevTools protocol directly instead of WebDriver, Puppeteer is fast and has first-class access to the network, the console and tracing. The same design ties it to Chromium-based browsers and the JavaScript ecosystem.
- JavaScript and TypeScript (Node.js)
- Chrome DevTools Protocol, network and tracing access
- Chrome, Chromium, Edge · Firefox experimental, no Safari/IE
Selenium vs Puppeteer: side-by-side comparison
Across the dimensions that matter for picking, migrating or running both in CI.
| Dimension |
|
|
|---|---|---|
| First release | 2004 | 2017 |
| Maintained by | Open-source community + W3C | Google (Chrome team) |
| Protocol | W3C WebDriver | Chrome DevTools Protocol |
| Languages | Java, Python, C#, Ruby, JS, Kotlin | JavaScript / TypeScript |
| Browsers | Chrome, Firefox, Safari, Edge, IE 11 | Chrome, Chromium, Edge |
| Firefox / Safari | Both supported | Firefox experimental, no Safari |
| Mobile testing | Real iOS + Android via Appium | None |
| Speed | Mature, predictable | Faster on Chrome (direct CDP) |
| Network interception | BiDi (Selenium 4) or proxy | First-class (CDP) |
| Scraping / PDF / tracing | Possible | First-class |
| Test runner | Bring your own (JUnit, pytest) | Bring your own (Jest, Mocha) |
| Standard | W3C WebDriver standard | Chrome-specific protocol |
| Parallel execution | Selenium Grid | Worker-based (Jest, Mocha) |
| Ecosystem maturity | 20 years of integrations | Strong since 2017 |
| Free for open source on TestingBot | ✓ | ✓ |
Feature notes reflect Selenium 4.x and Puppeteer 23.x as of 2026. Both run on TestingBot's cloud, Selenium through the WebDriver hub and Puppeteer through the browserWSEndpoint connection.
Logging in, asserting the result
A login flow with an explicit wait (Selenium) and a DevTools-protocol session (Puppeteer). Both run on the same TestingBot grid.
# Driver points at TestingBot remote URL from selenium import webdriver from selenium.webdriver.common.by import By from selenium.webdriver.support.ui import WebDriverWait from selenium.webdriver.support import expected_conditions as EC def test_login_redirects_to_dashboard(driver): driver.get('https://app.example.com/login') driver.find_element(By.NAME, 'username').send_keys('jane@example.com') driver.find_element(By.NAME, 'password').send_keys('••••••••') driver.find_element(By.CSS_SELECTOR, 'button[type=submit]').click() # explicit wait WebDriverWait(driver, 10).until(EC.url_contains('/dashboard')) welcome = driver.find_element(By.TAG_NAME, 'h1') assert 'Welcome, Jane' in welcome.text
// connect to TestingBot over the DevTools protocol import puppeteer from 'puppeteer-core'; const caps = { key: 'KEY', secret: 'SECRET', browserName: 'chrome', browserVersion: 'latest' }; const browser = await puppeteer.connect({ browserWSEndpoint: `wss://cloud.testingbot.com/puppeteer?capabilities=${encodeURIComponent(JSON.stringify(caps))}`, }); const page = await browser.newPage(); await page.goto('https://app.example.com/login'); await page.type('#username', 'jane@example.com'); await page.type('#password', '••••••••'); await page.click('button[type=submit]'); await page.waitForSelector('h1');
The Selenium test connects to the WebDriver hub; the Puppeteer script connects via browserWSEndpoint. Both appear in the same TestingBot dashboard.
When to choose which
Choose Selenium when
- You need true cross-browser coverage, including Safari, Internet Explorer 11 and Edge, not just Chromium.
- Your team writes Java, C#, Ruby or Python and wants full client-library parity.
- You test real iOS and Android devices, where Appium reuses the same WebDriver protocol.
- You want a vendor-neutral, W3C-standard protocol rather than a Chrome-specific one.
- You have a mature Page Object library or BDD framework (Cucumber, SpecFlow) you do not want to rewrite.
Choose Puppeteer when
- You only need to automate Chrome, Chromium or Edge and want the fastest possible runs.
- Your team is Node.js-first and you want a JavaScript or TypeScript API.
- You do web scraping, PDF generation, screenshots or performance tracing alongside testing.
- You want direct DevTools-protocol access to the network, console and CDP events.
- You do not need Safari, Internet Explorer, real mobile devices or non-JavaScript languages.
Stop choosing, run both on the same grid
Point Selenium at the WebDriver hub and connect Puppeteer through its browserWSEndpoint. Your tests share the same 6100+ browsers and devices, the same dashboard, the same parallel slots and the same EU data residency.
- Same auth, same project, same billing
- Side-by-side test history for both tools
- Free for open source, both tools
command_executor='https://hub.testingbot.com/wd/hub'
)
browserWSEndpoint:
'wss://cloud.testingbot.com/puppeteer'
})
Frequently Asked Questions
The questions teams ask before picking, or combining, these tools.
Is Puppeteer faster than Selenium?
Usually yes, on Chrome. Puppeteer talks the Chrome DevTools Protocol directly, avoiding the HTTP round-trips of the WebDriver protocol, so Chrome-only suites often run faster. But the gain only applies to Chromium-based browsers, and it narrows once tests are network-bound. Selenium 4's BiDi support also closes the gap. Speed is real but rarely the deciding factor against Selenium's cross-browser reach.
Can Puppeteer replace Selenium?
Only for Chrome-focused work. Puppeteer is excellent for automating Chrome, Chromium and Edge from Node.js, but it cannot drive Safari or Internet Explorer, has no real mobile support, and is JavaScript-only. If you need cross-browser testing, multiple languages or real devices, Selenium remains the broader tool. Many teams use Puppeteer for fast Chrome checks and Selenium for full cross-browser coverage.
Does Puppeteer support browsers other than Chrome?
Puppeteer drives Chrome, Chromium and Chromium-based Edge, with experimental Firefox support. It cannot drive Safari or Internet Explorer. Selenium drives the real binaries of every major browser through vendor drivers, including Safari and Internet Explorer 11. If you need anything beyond Chromium, Selenium is the option of the two. TestingBot runs both across its browser grid.
Can Puppeteer test mobile apps?
No. Puppeteer offers mobile viewport emulation in Chromium, but it cannot drive native iOS or Android apps. For real mobile testing you need Appium, XCUITest, Espresso or Maestro. Appium reuses the WebDriver protocol Selenium is built on. TestingBot runs all of these on real iOS and Android devices.
Is Puppeteer or Selenium better for web scraping?
Puppeteer is the more common choice for scraping, PDF generation and headless Chrome automation, thanks to its direct DevTools access and Node.js ecosystem. Selenium can scrape too, but its strength is cross-browser test automation across many languages. Pick the tool that matches the job: Puppeteer for Chrome automation tasks, Selenium for standards-based cross-browser testing.
Can I run Puppeteer in parallel on TestingBot?
Yes. Puppeteer's worker-based parallelism (via Jest, Mocha or a custom runner) works against the TestingBot grid: each worker opens its own remote browser over the WebSocket endpoint. Concurrency is capped by your plan. Selenium parallelises the same way through the WebDriver hub.
Can I run Selenium and Puppeteer on TestingBot?
Yes, both run on the same TestingBot cloud. Selenium connects to https://hub.testingbot.com/wd/hub via webdriver.Remote. Puppeteer connects with puppeteer.connect using a browserWSEndpoint of wss://cloud.testingbot.com/puppeteer. Tests from both show up in the same dashboard, share parallel slots, and benefit from the same EU data residency, video recording and CI/CD integrations. Both are free for open source projects.
Going deeper? See the dedicated Selenium and Puppeteer pages.
Related comparisons
Sign up for a Free Trial
Run Selenium, Puppeteer, or both, on TestingBot's cloud.
Start a free trial