# What is Browser Automation? Also called web automation, browser agent. Browser automation is the programmatic control of a web browser, driving navigation, clicks, typing, and data extraction through code. It is used for testing, for repetitive web tasks, and increasingly to let AI agents operate websites that offer no API. Modern tools control real browser engines, so pages behave the same way they do for an ordinary visitor. Automation tools attach to a browser through a control interface, either a standardized remote control protocol or a browser's own debugging protocol. Scripts locate elements by selector, accessibility role, or visible text, then dispatch events and read the results. Because pages load asynchronously, the difference between reliable and flaky automation is almost entirely about waiting for the right condition instead of a fixed delay. Agents use browsers in two distinct ways. One passes a structured representation of the page, such as the accessibility tree, to the model and executes precise commands against identified elements. The other works from screenshots and moves a pointer by coordinates. The structured approach is faster, cheaper, and considerably more reliable, while the visual approach covers cases where no structure is available. Automation is brittle by nature, because it depends on an interface built for people and free to change without notice. Selectors tied to styling break on any redesign. Sites also actively detect automated clients, and deliberately evading that detection raises both technical and terms of service problems. Where a documented API exists, driving the browser instead is almost always the wrong choice. A browser under agent control renders untrusted content, and that content can contain text written specifically to redirect the agent reading it. Treat every page as data rather than as instruction, keep sessions and credentials narrowly scoped to the task, and require explicit confirmation before irreversible actions such as purchases, sends, and deletions. ## Key points - Code drives a real browser to navigate, click, type, and extract. - Reliability depends on waiting for conditions, not fixed delays. - Structured page representations beat pixel coordinates for agents. - Brittle by design, since human interfaces change without notice. - Rendered page content is untrusted input, never instruction. ## In practice A weekly report lives inside a supplier portal that offers no API. An automation script signs in, waits for the dashboard table to appear, selects last week in a date filter, clicks export, waits for the download to finish, and saves the file to a shared folder. The script runs on a schedule without supervision, and it breaks the day the supplier redesigns that filter. ## Related terms - [Headless Browser](/en/glossary/headless-browser) - [Computer Use](/en/glossary/computer-use) - [Web Scraping](/en/glossary/web-scraping) - [Sandbox](/en/glossary/sandbox) - [API](/en/glossary/api) [Back to the AI Glossary](/en/glossary)