You cannot be in two places at once. But your AI agent can.
Learn how to use AI agents with Playwright CLI to do exploratory testing, while you are working in parallel on something more fun.
โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
๐ง ๐๐ก๐๐ญ ๐๐จ๐๐ฌ ๐ก๐ฎ๐ฆ๐๐ง ๐๐ฑ๐ฉ๐ฅ๐จ๐ซ๐๐ญ๐จ๐ซ๐ฒ ๐ญ๐๐ฌ๐ญ๐ข๐ง๐ ๐ฅ๐จ๐จ๐ค ๐ฅ๐ข๐ค๐?
A tester:
โ Thinks about what to try next
โ Clicks, observes, and takes notes
โ Stops when something blocks them
โ Hands findings to the team
Playwright CLI + AI coding agent can do the same. Completely autonomously.
And you can set it up and configure it in 30 minutes, then send it to work for hours.
โ๏ธ ๐๐๐ซ๐ ๐ข๐ฌ ๐ญ๐ก๐ ๐ฌ๐๐ญ๐ฎ๐ฉ:
You need to create only 1 file `๐ฌ๐ญ๐๐ฉ๐ฌ.๐ฆ๐` that defines the mission and the rules for the agent:
- How to use Playwright CLI
- Start URL (and environment)
- Scope. What area or flow to explore:
- What area of the application should be covered and what should ignored.
- Credentials or test data (or where to find them)
- Rules. What to look for and what to ignore
- Where to write the report with all findings: `๐ซ๐๐ฉ๐จ๐ซ๐ญ.๐ฆ๐`
๐ ๐๐ฎ๐ฅ๐๐ฌ ๐๐๐๐ญ๐ข๐จ๐ง ๐๐ซ๐๐๐ค๐๐จ๐ฐ๐ง in `๐ฌ๐ญ๐๐ฉ๐ฌ.๐ฆ๐`
โโโโโโโโโโโโโโโโโโโโโโโโ
What to look for (report these):
โคท Functional bugs. Button does nothing, wrong redirect, form does not submit
โคท Broken UI. Missing elements, layout breaks, overlapping content
โคท Wrong or missing copy on critical paths (checkout, login, errors)
โคท JavaScript errors that break user actions
โคท Failed network requests on critical APIs (auth, payment, save)
โคท Accessibility blockers.
โคท Dead ends. 404, infinite spinner, error with no recovery
What to ignore:
โคท Third-party analytics / tracking failures (Google Analytics, etc.)
โคท Benign console warnings (deprecated API in a vendor script)
โคท Cosmetic-only issues (misalignments, font weight on footer)
โคท Cookie banner / GDPR UI unless it blocks the flow under test
โโโโโโโโโโโโโโโโโโโโโโโโ
After you are done with the `๐ฌ๐ญ๐๐ฉ๐ฌ.๐ฆ๐`, just point the AI agent to the file and let it loose. The agent will read the file and create an empty `๐ซ๐๐ฉ๐จ๐ซ๐ญ.๐ฆ๐` to fill as it goes.
๐ ๐๐จ๐ฐ ๐๐ญ ๐๐จ๐ซ๐ค๐ฌ ๐๐ง๐๐๐ซ ๐ญ๐ก๐ ๐๐จ๐จ๐
For each step the agent performs:
โ `open` / `goto` the page using Playwright CLI
โ `snapshot` to read what is on screen
โ Decide the next action (click, fill, navigate)
โ Run the action
โ `snapshot` again
โ Append findings to `๐ซ๐๐ฉ๐จ๐ซ๐ญ.๐ฆ๐`
โ Move to the next step
๐๐ก๐ ๐๐ ๐๐ง๐ญ ๐ฌ๐ญ๐จ๐ฉ๐ฌ ๐จ๐ง๐ฅ๐ฒ ๐จ๐ง ๐ ๐๐จ๐ฆ๐ฉ๐ฅ๐๐ญ๐ ๐๐ฅ๐จ๐๐ค๐๐ซ:
โ Login wall with no credentials
โ Captcha or MFA with no bypass
โ Missing test data that cannot be inferred
โ Environment down (5xx, blank page, cannot load app)
๐๐ญ ๐ญ๐ก๐ ๐๐ง๐ ๐ฒ๐จ๐ฎ ๐ซ๐๐ฏ๐ข๐๐ฐ ๐ซ๐๐ฉ๐จ๐ซ๐ญ.๐ฆ๐ ๐๐ง๐ ๐๐๐๐ข๐๐ ๐ฐ๐ก๐๐ญ ๐ญ๐จ ๐๐จ ๐ง๐๐ฑ๐ญ.
โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
๐ Why `๐ซ๐๐ฉ๐จ๐ซ๐ญ.๐ฆ๐` is important
The agent writes to `๐ซ๐๐ฉ๐จ๐ซ๐ญ.๐ฆ๐` after every single step:
โ๐๐จ๐ฎ ๐๐๐ง ๐ฐ๐๐ญ๐๐ก ๐ข๐ญ ๐ฅ๐ข๐ฏ๐. Open the file while the agent runs and see findings appear in real time. No need to wait for it to finish.
โ ๐๐จ๐ญ๐ก๐ข๐ง๐ ๐ ๐๐ญ๐ฌ ๐ฅ๐จ๐ฌ๐ญ. If the agent hits a blocker or crashes mid-session, everything found up to that point is already saved.
At the end you get a flat list of every action taken and every bug found.
โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
๐ ๐๐ซ๐๐๐ญ๐ข๐๐๐ฅ ๐๐ข๐ฉ๐ฌ
โงฝ Run in parallel, not in series
If you have a few user workflows, run a few agents in parallel. Just open different AI chat windows and give each agent its own rules file.
โงฝ Headed vs headless
First run on a new flow: headed, so you can glance at the browser if needed. Repeat runs on the same flow: headless is fine.
โงฝ Exploration โ automation
This is not a replacement for automation. Automation is deterministic; this approach is not. It is designed to mimic a human tester doing exploratory testing with somewhat random steps.
โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
๐ Want to set this up on your repo with rules files, report templates, and live agent workflows?
Join the AI AutoTest Live Workshop โ hands-on practice with Playwright CLI, exploratory charters, and QA-specific agent instructions.