All posts
Open Source & Dev Tools

Comparing 3 browser automation tools

I sorted out selection criteria by purpose and practical pitfalls based on the official documentation of Playwright, Selenium, and Browser Use. It is not based on benchmarks I ran myself, and it focuses on the point that the three tools are not competitors but sit at different layers.

Jul 3, 2026Updated Oct 20, 2026 5 min read

Why browser automation is getting attention again now

Browser automation started out as test automation, but its scope is now much wider. Its uses have grown to include collecting data after logging in, repetitive admin-screen tasks, QA verification, and even agent-style workflows in which an LLM handles the web directly, so the choice has become important again.

In particular, the requirements for automation for testing and automation for AI agents have diverged. Both operate a browser, but the features they need are different. For testing, stable selectors, a waiting strategy, and reproducibility are important, while for agents, understanding screen context, step-by-step reasoning, and failure recovery matter more.

The character of the three tools at a glance

ToolCore characterStrengthsShortcomings
PlaywrightA modern browser automation and testing frameworkHandles Chromium, Firefox, and WebKit through a single API, and its auto-wait and web-first assertions are powerful. It also provides a trace viewer and parallel execution out of the box.It differs in character from the traditional WebDriver ecosystem, so organizations that have settled on Selenium need to be persuaded to adopt it.
SeleniumGeneral-purpose browser automation based on W3C WebDriverA wide choice of languages such as Java, Python, C#, JavaScript, and Ruby, and it is good for keeping legacy test assets as they are.On new projects, things like wait handling take more effort than with Playwright.
Browser UseAI-agent-oriented browser automationIts focus on making an LLM operate the web is clear. It suits multi-step tasks well.Because LLM calls are required, every run comes with cost and nondeterminism, and as a strict regression-testing tool it serves a different purpose.

The official Playwright README explains that it controls Chromium, Firefox, and WebKit through a single API, and it highlights auto-wait and web-first assertions. The Selenium README states that it is a project that implements the W3C WebDriver specification. According to its GitHub description, Browser Use focuses on making websites easy for AI agents to work with, and its README describes a structure in which an LLM is connected so that the agent interprets tasks. The current README does not mention using Playwright, and the dependency list shows a CDP library (cdp-use).

The misunderstanding that comes from lining up tools at different layers in the same row

Put the three tools in one table and they look like competitors, but in practice they sit at different layers of the stack. Selenium is a tool that operates browsers on top of the WebDriver standard, and Playwright is a tool that controls browsers through its own API. Browser Use is an agent-style tool that puts an LLM decision-making layer on top of browser control, so compared with test frameworks like Playwright or Selenium, it is less a substitute than a tool at a different layer of use. Which browser-control library it uses internally can change with the version, so check the repository's dependency list.

One practical judgment follows from this. If you need to verify the same screen over and over with the same result, a structure where an LLM makes a judgment every time is a poor fit. A deterministic script is far cheaper and more reproducible. Conversely, for work where the screens change often, or where there are dozens of sites and you can't maintain selectors one by one, an agent-style tool makes sense. In other words, the criterion is "whether I know the screen structure in advance and can hold it fixed."

Playwright itself is also expanding toward providing an MCP server and a CLI for coding agents, so the boundaries between the tools may blur going forward. That said, this post's comparison comes from reading each project's official documentation and README. It is not the result of implementing the same scenario with all three tools and measuring speed or success rate. If you need numbers like that, running a small comparison experiment on your own target screen is the accurate way to get them.

What to choose in which situation

SituationRecommendationReason
You want to stabilize E2E tests for a new web service quicklyPlaywrightAuto-waiting and per-browser execution are convenient, and the test code ends up relatively short.
You already have many Selenium-based testsKeep SeleniumImproving gradually without throwing away existing assets costs less.
An LLM needs to operate the web like a personBrowser UseIt fits agent flows better than general testing.
Cross-browser regression testing is the main goalPlaywright or SeleniumBoth are possible, but for a new project Playwright is quicker to start with.

Where people often get stuck in practice

Browser automation breaks down more often because of the environment than because of the tool. Typically, the items below are the first things to check.

  • Login session expiry and 2FA handling
  • Dynamic selector changes
  • Infinite scroll and virtual lists
  • Handling iframes, new windows, and popups
  • Rendering differences that appear only in headless versus headful mode
  • CAPTCHAs, bot detection, and rate limits

These problems aren't solved by swapping a single tool. So rather than "which tool is best," it makes more sense to first work out "whether what I'm trying to automate is a test, repetitive work, or an agent."

Recommended order to start

If you are learning these for the first time, the order is simple.

  1. Get a feel for basic automation and testing with Playwright.
  2. If you need a legacy environment or support for various languages, look at Selenium.
  3. When you want to hand web work that people used to do over to an LLM, consider an agent-style tool such as Browser Use.
import { test, expect } from '@playwright/test';

test('login button is visible', async ({ page }) => {
  await page.goto('https://example.com');
  await expect(page.getByRole('button', { name: 'Login' })).toBeVisible();
});

To test well, Playwright is convenient; to carry on old automation assets, Selenium has the advantage; and to hand the web to an AI agent, Browser Use is the natural fit. In practice, it is more efficient to divide up their roles than to make the three compete.

#Browser Automation#Playwright#Selenium#AI Agents
Robeedau

Written by AI from public sources; numbers and claims are checked against those sources before publishing.