Playwright vs Selenium vs Puppeteer for web scraping
By the ProxyOnly team · 16 Nov 2026 · 6 min read
Playwright, Selenium and Puppeteer compared for scraping, with tests of how each handles a proxy that needs a login and what gives an automated browser away.
All three tools drive a real web browser from code, so all three can scrape pages that only work with JavaScript. They differ in the languages they support, the browsers they drive, how they are built and, for anyone using proxies, how easily they accept a proxy with a username and password.
We ran Playwright 1.65 and Puppeteer 25.17 against Chrome 157 on 16 November 2026, through a test proxy on our own machine that demands a login. We did not run Selenium for this article. It downloads browser drivers on first use, and its current Node.js package also needs a newer Node.js 24 release than the one on our test machine. Its facts below come from its documentation and the WebDriver standard.
Before you choose: do you need a browser?
A browser is the slowest and most expensive way to fetch a page. If the data is in the HTML, or in a JSON request the page makes, an HTTP library gets it with a fraction of the memory and time. How to scrape a website compares the approaches. Reach for a browser when the page builds its content with JavaScript and there is no simpler request behind it, or when you need to click, scroll or log in.
The three at a glance
- Playwright: an open source project on GitHub under microsoft/playwright, licensed Apache-2.0. Its documentation lists JavaScript and TypeScript, Python, Java and .NET, and it drives Chromium, WebKit and Firefox. Version 1.65 was current on npm and PyPI.
- Puppeteer: licensed Apache-2.0 and, in its own words, a JavaScript library that controls Chrome or Firefox over the DevTools Protocol or WebDriver BiDi. Version 25.17.0 was current, and it requires Node.js 22.12 or later.
- Selenium: licensed Apache-2.0, built on WebDriver, which is a W3C standard. Its downloads page lists core bindings for C#, Ruby, Java, Python and JavaScript, all at 4.52.0 from 29 October 2026, and its documentation covers Chrome, Edge, Firefox and Safari. A tool called Selenium Manager downloads the matching browser driver automatically.
Proxies with a login: the biggest practical difference
Most paid proxies need a username and password. Chrome itself will not take them inside its proxy setting. We put the username and password inside Chrome's --proxy-server flag through Puppeteer, and the page failed with net::ERR_NO_SUPPORTED_PROXIES. Each tool works around that differently.
Playwright
Playwright takes the login as part of its proxy option, and you can give each browser context its own proxy. This is the script we ran, with executablePath pointing at an installed Chrome because we used the playwright-core package.
import { chromium } from "playwright-core";
const executablePath = "/Applications/Google Chrome.app/Contents/MacOS/Google Chrome";
const browser = await chromium.launch({
executablePath,
proxy: { server: "http://127.0.0.1:8101", username: "demo", password: "s3cret" },
});
const page = await browser.newPage();
await page.goto("https://quotes.toscrape.com/");
console.log("Playwright:", await page.title(), "|", await page.locator(".quote").count(), "quotes");
const other = await browser.newContext({ proxy: { server: "http://127.0.0.1:8104" } });
const page2 = await other.newPage();
await page2.goto("https://quotes.toscrape.com/page/2/");
console.log("Playwright, second context through another proxy:", await page2.locator(".quote").count(), "quotes");
await browser.close();Playwright: Quotes to Scrape | 10 quotes
Playwright, second context through another proxy: 10 quotesBoth test proxies logged a tunnel to quotes.toscrape.com, so each context really used its own. The Python version of Playwright takes the same proxy option. One limit: when we gave Playwright a SOCKS5 proxy with a username and password, it refused at launch with Browser does not support socks5 proxy authentication. Use an HTTP proxy when a login is needed.
Puppeteer
Puppeteer passes the proxy address to Chrome as a launch flag and supplies the login with page.authenticate().
import puppeteer from "puppeteer-core";
const executablePath = "/Applications/Google Chrome.app/Contents/MacOS/Google Chrome";
const browser = await puppeteer.launch({ executablePath, args: ["--proxy-server=http://127.0.0.1:8101"] });
const page = await browser.newPage();
await page.authenticate({ username: "demo", password: "s3cret" });
await page.goto("https://quotes.toscrape.com/");
console.log("Puppeteer:", await page.title(), "|", (await page.$$(".quote")).length, "quotes");
await browser.close();Puppeteer: Quotes to Scrape | 10 quotesThe documentation notes that authenticate() turns on request interception behind the scenes, which can affect performance. In our test a second page opened without calling it still loaded, most likely because Chrome had kept the login from the first page. Do not rely on that. Call it on every page. The proxy address is fixed for the whole browser, so a different proxy means a separate browser launch.
Selenium
Selenium sets proxies through the proxy capability of the WebDriver standard, which has fields for HTTP, TLS and SOCKS proxy hosts and a SOCKS version, but no separate username and password fields. With Chrome, a login usually means one of three workarounds: a small local proxy that adds the credentials before forwarding, a browser extension that answers the login prompt, or an IP allowlist with your provider so that no login is needed. selenium-wire, a library often recommended for this, is archived on GitHub, with its last change in January 2024.
What gives an automated browser away
Driving a real browser does not make a script look like a person. We loaded a header echo page in headless Chrome with each tool and checked two things a website can see.
Playwright navigator.webdriver = true
Playwright User-Agent header = Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) HeadlessChrome/157.0.0.0 Safari/537.36
Puppeteer navigator.webdriver = true
Puppeteer User-Agent header = Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) HeadlessChrome/157.0.0.0 Safari/537.36Both announced themselves: the navigator.webdriver flag was true, and the user agent said HeadlessChrome. WebDriver browsers set the same flag, so Selenium is in the same position. A proxy changes the address, not these signals. Browser fingerprinting and why websites block IPs and proxies explain what else sites look at. The honest response to a site that blocks automation is to use its API or ask for access, not to hide.
Other differences that matter for scraping
- Waiting: Playwright runs actionability checks and waits for an element to be ready before it acts. With Selenium and Puppeteer you write more of the waiting yourself.
- Browsers: Playwright drives WebKit, the engine behind Safari, from any system. Selenium drives the real Safari on a Mac. Puppeteer is mostly about Chrome, with Firefox support.
- Languages: if your team works in Python, Java or C#, Puppeteer is out, because it is JavaScript only.
- Scale: Selenium Grid runs many browsers across machines, and many testing services speak WebDriver. Playwright and Puppeteer run well in containers with your own job queue.
- Isolation: Playwright's browser contexts give cheap separate sessions, each with its own cookies and proxy, inside one browser. That suits scraping with several identities or locations.
Which to choose
- Starting fresh, any language: Playwright. It has the simplest proxy login, per-context proxies and built-in waiting.
- A Node.js project that only needs Chrome: Puppeteer is fine, with
page.authenticate()on every page. - An existing Selenium codebase or Grid: stay with Selenium and solve the proxy login with an allowlist or a local forwarding proxy.
- No JavaScript on the page: none of them. Use an HTTP library.
Our setup guides for Playwright with Node.js, Playwright with Python, Puppeteer and Selenium show the settings with a proxy from your order, and web scraping tools compared covers the other families of tools.
Try it yourself
Create an account, add funds from US$1 and order a proxy in the country you need.
Keep reading
16 Nov 2026 · Comparisons
Proxy switcher extensions: SwitchyOmega, FoxyProxy and alternatives
What happened to SwitchyOmega, the ZeroOmega fork that replaced it, FoxyProxy, what any proxy extension can see, how to pick a safe one, and setups that need no extension at all.
16 Nov 2026 · Comparisons
SOCKS4 vs SOCKS5 vs HTTP proxies: protocols compared
SOCKS4, SOCKS4a, SOCKS5 and HTTP proxies compared by what the client sends, who looks up the name, how you log in and what each one can carry.