Repository navigation
ai agent to test website
"Go to my app, register an account, add an item to the cart, and tell me everything that broke or confused you." That sentence is a test plan, and an agent with a real browser will execute it against your dev server right now, no test framework, no selectors, no setup beyond pointing it at localhost. This page is about what that is genuinely worth, which is a real and specific thing, and what it is not, which is your regression suite.
The scope rule comes first because everything on this page depends on it: your own application, on localhost or staging, with test data. Against your own app, mistakes are free, there are no terms to honor and no rate limits to respect, and you know the ground truth the agent's report gets checked against. That combination exists nowhere else on the web, which is why testing is the least complicated use of a browser agent on this whole wiki.
The working pattern is one instruction, one flow, one report:
Open http://localhost:3000. Register a new user with placeholder data, log in as that user, add any item to the cart, and go to checkout but do not place the order. At each step, tell me what you saw, anything that looked broken, and any error or validation message that appeared.
Run it through an editor client - Cursor or Cline, where the same assistant also has your code open - or from the terminal:
Open http://localhost:3000 and try to register a new user with placeholder data. Report every field, every validation message, and whether registration succeeded.
Typed into uvx invisible-playwright-mcp ui, which runs the task with the live page beside the
chat - and for testing the watching is worth having: seeing the agent
hesitate on your form is itself a finding. Two properties of
this browser matter specifically for testing. It fills forms through real key
presses and clicks, refusing script injection, so your input handlers,
keystroke validation and change events fire the way they fire for people. And
the editor-client route closes the loop in one conversation: the agent that
just hit the bug is the assistant reading the handler that caused it, so "now
find why" is the natural next sentence.
A scripted test asserts what you thought to assert. The agent reads the page like a first-time user with infinite patience, and its findings cluster exactly where scripted suites are blind:
- The unasserted breakage. The suite checks that registration returns 200; the agent reports that the success page renders with the username missing and a raw template variable in the heading. Nobody wrote that assertion, because nobody predicted that break.
- Confusion as a finding. "The button labeled Continue took me back to the start" or "two fields are both labeled Name and I could not tell which was which." No assertion fails on confusing; an agent narrating its own attempt surfaces it. It is a cut-rate usability pass - genuinely cut-rate, and genuinely a pass.
- Validation behavior in full. Ask it to probe a form with wrong inputs on purpose - bad emails, empty requireds, a date in the past - and report every message. The forms page describes agents fighting validation as a failure mode; against your own form it inverts into coverage, and the agent's misreadings of your error messages are findings too. If it could not connect the message to the field, some users will not either.
- The path you never test by hand. Flows behind three clicks of setup decay unexercised. An agent walks them for cents while you review a diff.
- Links that a crawler reports as fine. Links built by JavaScript, targets behind the session, and pages that answer 200 with a not-found message are the three cases a link checker cannot see. Finding the dead links on a site with an AI agent is narrow about that, and opens by telling you to use a plain checker for everything else.
The concession, without hedging: an agent is not a regression suite and cannot become one. A scripted Playwright test runs in seconds, costs nothing per run, produces the same verdict every time, and fails loudly in CI the moment a change breaks the checkout - that determinism is the entire point of a test suite, and a model-driven agent has none of it. Speed alone disqualifies it from the inner loop: an agent run is tens of seconds and a model bill; your suite is hundreds of assertions before the coffee cools.
The two are not rivals; they are a feeder pattern. The agent explores and finds; what it finds worth protecting, you pin down as a scripted test. For that half, invisible_playwright_mcp's own engine is a library with Playwright's API - invisible_playwright - and its wiki covers scripted browser automation in a depth this page does not attempt. Realistic browser behavior in scripted tests matters more than people expect, because users do not send synthetic events.
An agent run is a stochastic process on both ends: the model reads and decides differently across runs, and your app under development shifts too. Consequences to accept up front, not discover:
- Same instruction, different walk. Two runs may click different valid paths to the same goal, and one may notice what the other skipped. For exploration that variance is a feature; for a pass/fail gate it is disqualifying. Do not wire an agent verdict into CI as a blocker.
- A reported bug is a lead, not a verdict. Reproduce it by hand before filing. The transcript and screenshots tell you where it thought it was; browser problem or model problem is the sorting guide when the report itself seems off.
- Repetition is the instrument. One clean run proves little; several runs that all pass the same flow mean more. This wiki's own testing rule for verdicts on nondeterministic domains is many runs, and your app under an agent is exactly such a domain.
-
--seedpins the browser identity, not the model's choices. Useful so each run is not a new device to your analytics; it does not make runs repeat. Nothing makes runs repeat - that is what your scripted suite is for.
Can an AI agent test my website? Yes, as a plain-language smoke tester and exploratory prober on your own app: give it a flow in a sentence, get a narrated report of what broke or confused it. It complements a scripted suite; it does not replace one, and the flakiness section above is why.
What does it catch that Playwright tests do not? The unasserted: renders nobody predicted would break, confusing labels and dead-end flows, validation messages that do not reach a reader. Scripted tests check what you anticipated; the agent reports what it met.
Should it run in CI? Not as a gate. Model-driven runs are nondeterministic, slow and metered; a red that means "the agent wandered" and a green that means "the agent did not look" both poison a pipeline. Keep it as an on-demand explorer, and let what it finds graduate into scripted tests.
How do I let it test behind my app's login? Simplest on your own app:
create a test account and put the credentials in the instruction - it is your
system, so the caution about credentials traveling through the model is
yours to weigh. A persistent --profile-dir with a login done once by hand
also works, same pattern as elsewhere on this wiki.
Why does it fail on my custom datepicker? The same reason agents fail on everyone's custom widgets - the forms page catalogs it. On your own site that failure is information: if an agent reading the accessibility tree cannot work your widget, check what a screen reader user meets.
Is the browser realistic enough to matter for testing? It is a real patched Firefox sending real input events, so handlers fire as they do for people. For most functional testing any browser would do; the realism starts mattering when what you are testing is behavior that differs between real input and synthetic events.
All retrieved 2026-09-03.
- oss-invisible/playwright and its wiki, the Playwright-API engine and its scripted-automation reference, linked for the regression-suite half of the pattern.
-
oss-invisible/playwright_mcp, plus its README and
source in this repository, for the real-input-events behavior,
--headed,--seed,--profile-dir, and the agent loop the flakiness section describes.
See also: running invisible_playwright_mcp's browser from Cursor, running invisible_playwright_mcp's browser from Cline, getting an AI agent to fill out forms, and browser problem or model problem?.
From the invisible_playwright_mcp wiki. The most useful bug report the maintainer ever got from the agent was three words about a form nobody had touched in months: "Continue does nothing."
- OpenAI Operator alternatives
- Open-source Operator-style agents
- Is OpenAI Operator still available?
- OpenAI Operator vs Claude computer use
- browser-use alternatives
- Choosing an AI browser agent
- Open-source AI browser agents
- Open-source computer-use agents
- What is an AI web agent?
- AI browser agents vs traditional scraping
- Cloud browser infrastructure for AI agents, explained
- Browserbase alternatives
- Firecrawl vs an AI browser agent
- Skyvern alternatives
- Stagehand vs browser-use
- Project Mariner is gone: what replaced it
- Manus alternatives
- Gemini computer use vs Claude computer use
- A stealth browser MCP, reviewed honestly by its own wiki
- AI browser vs AI browser agent: which one do you want?
- AI browser agent vs RPA: which one fits the job
- AI browser agent vs n8n, Zapier and Make
- Vercel agent-browser alternatives, compared honestly
- What is an agentic browser? Definition and the two kinds
- Open-source agentic browsers: the three layers, compared
- Choosing an MCP server for browser automation: four axes
- Stealth MCP servers compared: Camoufox, nodriver, Patchright
- Playwright MCP alternatives, and the three you don't need
- Autonomous browser agents: the four rungs of autonomy
- What is actually free in the AI browser agent stack
- browser-use on GitHub: what the repo actually gives you
- Playwright MCP vs Chrome DevTools MCP: different jobs
- How to choose among MCP servers: a map by category
- Which MCP servers are worth adding to Claude Code
- MCP on GitHub: finding servers and judging them fast
- MCP vs an API: the decision, and what the wrapper costs
- MCP alternatives: when the protocol is the wrong shape
- Why does my AI agent get blocked?
- The timing signal AI agents give off
- Agent retry loops trip rate limits, not fingerprints
- Claude computer use detected as a bot
- browser-use getting blocked: what you can and cannot change
- Playwright MCP session blocked: four causes, four fixes
- Playwright MCP and captchas: what actually gets you past
- Cloudflare and a browser MCP server: what is being read
- Can an AI agent solve a captcha? The honest answer
- Getting an AI agent to fill out forms
- The best model for an MCP browser agent, and what it really costs
- Browser problem or model problem?
- How to use a Playwright MCP server with Claude Code
- Extracting data to a CSV with an AI agent
- Monitoring a page for changes with an AI agent
- How to let Claude Desktop control a browser
- How to add a browser to Cursor as an MCP server
- Using an AI agent to hunt for apartments
- Getting website data into Google Sheets with an AI agent
- Using an AI agent to download invoices from portals
- AI agents for web research
- Using an AI agent to test your own website
- How to add a browser to Cline as an MCP server
- Posting to social media with an AI agent
- Posting to Facebook with an AI agent
- Posting to Instagram with an AI agent
- Posting to X with an AI agent
- Automating LinkedIn posts: read this first
- Appointment bots: what they are and what an agent can legitimately do
- Track prices across sites with an AI agent
- Build a lead list with an AI browser agent
- Run an AI browser agent on a schedule
- AI browser agent with a local LLM: what changes
- Should you log your AI agent into your accounts?
- How to write a task an AI browser agent can follow
- Move data between two web apps with an AI agent
- The MCP server
- How the tools are shaped, and why
- Playwright MCP vs the Playwright CLI: which fits when
- Playwright MCP: browser is already in use, and the fix
- Playwright MCP best practices: four decisions that matter
- Playwright MCP with a proxy, and the three leaks it leaves
- A browser MCP server in GitHub Copilot: setup and limits
- Using a browser MCP server for web scraping: the pattern
- Which LLM for browser automation: the four properties
- How to build a browser agent, and what to take instead
- Getting an AI agent to log into a website: three routes
- MCP tools, resources and prompts: who controls each
- How many MCP tools is too many? The context arithmetic
- How to build an MCP server: the decisions, not the scaffold
- Local or remote MCP server: what changes, and what does not
- Writing an MCP client in Python: the thirty-line version
- Self-hosted AI agent: what one actually costs to run
- How long an AI browser agent takes per step, measured
- Text, HTML, snapshot or screenshot: what the agent should read
- Giving an AI browser agent a stopping condition
- Keeping an AI browser agent out of destructive actions
- Why did the AI agent click the wrong thing
- When the page changes under the AI agent
- Running one AI agent task across a list of sites
- Seeing a page as it appears in another country
- Getting data out of a dashboard with no export button
- Two browsers in one session: main and support
- Finding the dead links on a site with an AI agent
- Filling a CRM record from a company's website
- One form submission per spreadsheet row, with an AI agent
- Dated screenshots of a page as evidence
- Checking order and delivery status with an AI agent
- Reading a PDF that opens inside the browser
- Summarising a long page or thread with an AI agent
- Collecting every image on a page with its caption
- Collecting event and course listings with an AI agent
- Cancelling a subscription with an AI agent
- What an AI agent can and cannot do inside an iframe
- Shadow DOM and an AI agent: you can click it, you cannot read it
- How to add a browser to Codex as an MCP server
- What a page snapshot costs, per control
- How to let Gemini CLI use a browser
- Native selects and the ones that only look like selects
- Clicking by selector or by coordinates
- How long the agent waits before it gives up
- What a second browser costs
- Uploading a file with an AI agent, and why this one cannot
- Watching the agent work, and when it is worth it
- When not to use an AI browser agent
- Agent or script: deciding once instead of every time
- Using the keyboard instead of the mouse
- Secrets in an agent task: where they end up
- What an agent run should log
- Deduplicating what an AI agent collects
- Normalising values across sites
- Validating an AI agent's output
- Reading a table with an AI agent
- Driving a site's own search and filters
- The task works headed and fails headless
- How to let the AdaL CLI use a browser