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 agents. That is more tolerant of layout changes but slower and less predictable.
Browser automation overlaps with web scraping, which uses the same tools to read pages, and with 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 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 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.