Crawl: the most reliable web crawler APISee what’s new
Zenrows
Talk to sales Start free

Browser automation

Browser automation is software driving a real web browser through a task a person would do by hand: logging in, searching, clicking through steps, downloading files. Zenrows runs that browser in its cloud with Zenrows' stealth; your Playwright or Puppeteer code connects over CDP, and the task returns data or documents to your systems.

Updated

Sample output: one portal retrieval run
{
  "task": "monthly_statement_download",
  "portal": "vendor-portal.example.com",
  "account_ref": "acct_0042",
  "started_at": "2026-10-17T06:00:04Z",
  "finished_at": "2026-10-17T06:02:41Z",
  "steps": [
    { "action": "goto", "target": "/login", "ok": true },
    { "action": "fill", "target": "#username", "ok": true },
    { "action": "click", "target": "button[type=submit]", "ok": true },
    { "action": "goto", "target": "/account/statements", "ok": true },
    { "action": "fetch_file", "target": "statement-2026-09.pdf", "ok": true }
  ],
  "files": [
    { "name": "statement-2026-09.pdf", "bytes": 184320, "period": "2026-09" }
  ],
  "fields": { "amount_due": 4182.5, "currency": "USD", "due_date": "2026-11-05" },
  "status": "completed"
}
Illustrative: one run record per task, so a missing statement or failed step shows that morning.

Browser automation tasks teams run

It pays off on work that lives only inside a website: portals without an API, dashboards without export, four-click lookups.

TaskWhat the browser doesTypical targets
Document retrieval Logs in, downloads statements, invoices, remittances, CSVs Vendor, utility, bank and payer portals
Status lookups Reads eligibility, license, permit or case status Insurer provider portals, state licensing boards, permit and court systems
Dashboard checks Reads balances, metrics, order status Partner portals and SaaS tools you use
Multi-step searches Searches, filters, pages, reads each result Government registries, availability calendars, booking systems
Data entry Submits database records into forms Quote, application and registration forms, see automated form filling
Agent-driven tasks An AI agent picks the clicks at run time Any site, via the MCP Server

Why browser automation breaks in production

Laptop scripts fail in week three of a schedule, rarely because of the script.

What it looks like

The portal flags the sign-in as a bot

How Zenrows handles it

Each session runs real Chromium with Zenrows' stealth

How to automate a browser task with Zenrows

  1. Record the task by hand once: every page, field, button, and the final value you need.
  2. Connect your script to Zenrows: point Playwright's connectOverCDP or Puppeteer's connect at the Zenrows WebSocket URL; nothing else changes.
  3. Keep secrets out of the code: use env variables or a secrets manager; close the session when done.
  4. Log every step, like the sample, and alert on runs that stop early.
# pip install playwright
import base64
import os
from playwright.sync_api import sync_playwright

with sync_playwright() as p:
    browser = p.chromium.connect_over_cdp(
        "wss://browser.zenrows.com?apikey=YOUR_ZENROWS_API_KEY"
    )
    page = browser.new_page()
    page.goto(PORTAL_LOGIN_URL)
    page.fill("#username", os.environ["PORTAL_USER"])
    page.fill("#password", os.environ["PORTAL_PASSWORD"])
    page.click("button[type=submit]")
    page.wait_for_url("**/dashboard")

    page.goto(STATEMENTS_URL)
    pdf_url = page.locator("a.statement-download").first.get_attribute("href")
    pdf_b64 = page.evaluate("""async (url) => {
        const res = await fetch(url, { credentials: "include" });
        const bytes = new Uint8Array(await res.arrayBuffer());
        let binary = "";
        for (const b of bytes) binary += String.fromCharCode(b);
        return btoa(binary);
    }""", pdf_url)
    with open("statement.pdf", "wb") as f:
        f.write(base64.b64decode(pdf_b64))
    browser.close()

What success looks like

MeasureWhat good looks likeHow to check it
Run completion Scheduled runs reach the final step Share of run records ending completed
Minutes per task The same few minutes every run Session duration, from run records or the Zenrows dashboard
Re-login rate One sign-in per session, no forced re-auth Runs that hit the login page twice or more
Document completeness Every expected file, every account and period Files retrieved against the account and period list
Manual hours replaced Manual tasks run on a schedule Weekly portal hours, before and after
Failed step rate Failures cluster on known steps and drop with fixes Failed runs by last recorded step

Browser automation FAQ

  • A program driving a browser as a person would: open, type, click, wait, read, download. Used on portals and web apps with no API, mostly via Playwright or Puppeteer.

  • A scraping API like Fetch for public data at one URL; a browser for sign-ins, click sequences, downloads or state across pages. Many setups mix both: Browser for login and lookup, Fetch for public pages.

  • Yes. Replace the local browser launch with a connection to wss://browser.zenrows.com?apikey=YOUR_ZENROWS_API_KEY, via connectOverCDP in Playwright or connect in Puppeteer. Selectors, waits and page logic stay.

  • Yes: logins work as locally, and cookies persist for every step. For one-time codes, your script reads them from an inbox or authenticator your team controls.

  • Yes. The MCP Server gives Claude, Cursor, Codex and other MCP clients tools to navigate, click, fill and read. The agent picks each step at run time, for tasks too varied for a script. See AI agent browser.

  • From your scheduler: cron, CI, Airflow or serverless. The browser runs in the Zenrows cloud, so the trigger needs only your script and network, not Chromium. One session per account, one run record per task, and an alert on early stops, so a missing statement surfaces the same day.

  • Common, but each portal's terms decide, and some restrict automation. Use credentials your organization may use, keep personal and health data within your compliance rules, and ask legal when terms are unclear.

Turn the live web into usable data.