# Browser automation

> Browser automation is software controlling a web browser the way a person would, opening pages, clicking, typing and downloading, so that repetitive tasks in websites without an API can run on their own.

Also called: headless browser, web automation, Playwright automation, Selenium automation. Category: Agents and automation. Source: https://aibuildindex.com/glossary/browser-automation

## In the index

- Browser automation: median $2,000, middle half $500 to $10,000, 121 priced briefs (https://aibuildindex.com/skills/browser-automation)
- Playwright: median $1,900, middle half $500 to $12,600, 126 priced briefs (https://aibuildindex.com/skills/playwright)
- Selenium: median $1,200, middle half $250 to $5,600, 237 priced briefs (https://aibuildindex.com/skills/selenium)

Plenty of business software has no API, or has one that does not cover the task at hand: a supplier portal, a government filing site, an old internal tool. Browser automation fills that gap by scripting a real browser to log in, fill forms, click through screens and collect results. For a buyer it can remove hours of repetitive clicking, but it is also the most fragile way to integrate with another system, so it is worth knowing when to use it.

## How it works

A browser automation script drives a browser through a control library. Playwright, Puppeteer and Selenium are the common choices. The script finds elements on the page by selectors, such as a button's label or an input's name, performs actions on them and waits for the next page to load. Browsers can run visibly or "headless", without a window, on a server.

A typical example: each morning, a script logs in to a carrier's portal, searches for yesterday's shipments, downloads the delivery report as a CSV and drops it into a shared folder for the finance team. Adding AI changes the approach slightly. Instead of fixed selectors, a model can read the page and decide where to click, which is the idea behind [computer use](https://aibuildindex.com/glossary/computer-use) agents. That is more tolerant of layout changes but slower and less predictable.

Browser automation overlaps with [web scraping](https://aibuildindex.com/glossary/web-scraping), which uses the same tools to read pages, and with [robotic process automation](https://aibuildindex.com/glossary/robotic-process-automation), which applies the idea to desktop applications as well.

## What it means for cost

The script itself is often quick to write. The cost lies in making it dependable. Logins with two-factor authentication, CAPTCHAs, session timeouts and pop-ups each need handling, and every run needs [error handling](https://aibuildindex.com/glossary/error-handling) so that a failure is reported rather than silently skipped. Hosting a real browser on a server also costs more to run than a simple API call.

Ask a builder whether an [API integration](https://aibuildindex.com/glossary/api-integration) is possible first, since it is almost always sturdier. If browser automation is the only route, ask how failures are detected, who is told, and what maintenance is included when the target site changes its screens.

## When it is the wrong tool

If the target system offers an API, export or webhook, use that instead. Browser automation is a workaround for missing integration, and it breaks whenever the website is redesigned. Some sites also forbid automated access in their terms.

## Common questions

### What is the difference between Playwright and Selenium?

Both control browsers from code. Selenium is older and supports many languages and browsers through the WebDriver standard. Playwright is newer, maintained by Microsoft, and is often chosen for its built-in waiting and reliability features. Either can do most business automation tasks.

### Can browser automation handle two-factor login?

Sometimes. Options include reusing a saved session, using an authenticator secret the script can read, or pausing for a person to approve the login. Each has security trade-offs that should be agreed with whoever owns the account.

## Related terms

- [Web scraping](https://aibuildindex.com/glossary/web-scraping): Web scraping is the automated collection of data from websites, where a program loads pages, reads their content and saves the fields it needs, such as prices, listings or contact details, into a structured dataset.
- [Computer use](https://aibuildindex.com/glossary/computer-use): Computer use is an AI capability in which a model operates a computer through screenshots, mouse movements and keystrokes, letting an agent work in applications and websites that have no API.
- [Robotic process automation (RPA)](https://aibuildindex.com/glossary/robotic-process-automation): Robotic process automation is software that mimics a person using a computer, clicking buttons, typing into forms and copying data between screens, to automate repetitive tasks in applications that lack a usable API.
- [API integration](https://aibuildindex.com/glossary/api-integration): API integration is the work of connecting two or more software systems through their APIs so that data and actions flow between them automatically, for example syncing orders to accounting or sending CRM records to an AI model.
- [Error handling and retries](https://aibuildindex.com/glossary/error-handling): Error handling and retries are the parts of an automation or AI system that detect failed steps, try them again where that is safe, and report or park the work that still fails, so problems are noticed rather than silently lost.
- [AI agent](https://aibuildindex.com/glossary/ai-agent): An AI agent is software built around a language model that can plan steps, call tools such as APIs, databases or a browser, look at the results and keep going until it completes a task, rather than only replying to a single message.
