- Home
- Skills
- Testing & Debugging
- Playwright Test Generator with Evidence
Works with the AI Agents you already use
Playwright Test Generator with Evidence
Point your agent at any website and get validated Playwright TypeScript tests based on what's really on the page, with a screenshot and trace for every key action. Read-only exploration, no API keys needed.
$6
Playwright Test Generator with Evidence
Example session with this skill installed
Use the Playwright test generator skill on https://the-internet.herokuapp.com/login. Explore the page, then write tests for the login form: successful login with the demo credentials shown on the page (tomsmith / SuperSecretPassword!), and an error message for a wrong password. Capture evidence for each key action.
- Read your context and instructions
- Compiled the playwright test generator
- Generated the document
Summary
Explored https://the-internet.herokuapp.com/login read-only (6 controls, 2 headings, 1 form), generated 3 Playwright TypeScript tests from what was on the page, validated and ran them, and captured a screenshot per key action.
3 passed, 0 failed, 0 skipped.
Results
| Test | Status | Evidence file |
|---|---|---|
| login page shows its heading, username and password fields and the login button | PASSED | login-page-shows-its-heading-username-and-password-fields-and-the-login-button/login-form-present.png |
| logging in with the credentials printed on the page leaves the login page for /secure | PASSED | logging-in-with-the-credentials-printed-on-the-page-leaves-the-login-page-for-secure/login-submitted.png |
| submitting a wrong password keeps the visitor on the login page | PASSED | submitting-a-wrong-password-keeps-the-visitor-on-the-login-page/wrong-password-submitted.png |
Full summary in evidence/REPORT.md; screenshot paths are relative to evidence/.
Generated spec (tests/login.spec.ts)
import { test, expect } from "@playwright/test";
import { actionEvidence, observationEvidence, evidenceDir } from "./evidence";
const URL = "https://the-internet.herokuapp.com/login";
// The demo page prints its own test credentials ("Enter tomsmith ... SuperSecretPassword!"); these are not real ones.
const DEMO_USER = "tomsmith";
const DEMO_PASS = "SuperSecretPassword!";
test("login page shows its heading, username and password fields and the login button", async ({ page }, testInfo) => {
const dir = evidenceDir(testInfo);
await page.goto(URL);
await observationEvidence(page, "login-form-present", async () => {
await expect(page.getByRole("heading", { name: "Login Page", exact: true })).toBeVisible();
await expect(page.getByRole("textbox", { name: "Username", exact: true })).toBeVisible();
await expect(page.getByRole("textbox", { name: "Password", exact: true })).toBeVisible();
await expect(page.getByRole("button", { name: "\uf090 Login", exact: true })).toBeVisible();
}, dir);
});
test("logging in with the credentials printed on the page leaves the login page for /secure", async ({ page }, testInfo) => {
const dir = evidenceDir(testInfo);
await page.goto(URL);
await page.getByRole("textbox", { name: "Username", exact: true }).fill(DEMO_USER); // setup
await page.getByRole("textbox", { name: "Password", exact: true }).fill(DEMO_PASS); // setup
await actionEvidence(page, "login-submitted", async () => {
await page.getByRole("button", { name: "\uf090 Login", exact: true }).click();
}, async () => {
await expect(page).toHaveURL(/\/secure/);
}, dir);
});
test("submitting a wrong password keeps the visitor on the login page", async ({ page }, testInfo) => {
const dir = evidenceDir(testInfo);
await page.goto(URL);
await page.getByRole("textbox", { name: "Username", exact: true }).fill(DEMO_USER); // setup
await page.getByRole("textbox", { name: "Password", exact: true }).fill("not-the-password"); // setup
await actionEvidence(page, "wrong-password-submitted", async () => {
await page.getByRole("button", { name: "\uf090 Login", exact: true }).click();
}, async () => {
await expect(page).not.toHaveURL(/\/secure/);
await expect(page.getByRole("heading", { name: "Login Page", exact: true })).toBeVisible();
}, dir);
});
Next steps
- Open
evidence/REPORT.mdfor the full run summary and screenshots. - Give the agent more page URLs to explore and test the same way.
- Add
--strict-evidencewhen validating if you want every action, including setup, captured as evidence.
login-form-present.png
PDF · document
Example file from a real run - the skill writes it into your workspace.
Connects securely to your tools. The creator never sees your data.
About this skill
What it does
Give your coding agent a URL and this skill walks it through a disciplined QA workflow:
- Explore – a read-only script records what's actually on each page: headings, links, buttons, forms and their accessible names. It never clicks, types or submits.
- Generate – your agent writes Playwright TypeScript tests based on that inventory, following built-in conventions for stable, accessible selectors.
- Validate – a built-in validator rejects weak or unsafe tests (fragile text selectors, missing evidence, risky code) before they run.
- Run & report – every key action leaves a full-page screenshot plus a Playwright trace, summarized into a REPORT.md and index.json.
Why use it
- Tests grounded in reality. No invented selectors or guessed outcomes. Assertions are based on what the page shows or what you tell it.
- Evidence by default. Hand reviewers screenshots and traces, not just a green tick.
- Works in any agent that can run Node: Claude Code, Cursor, Copilot, Codex CLI and more.
- No API keys. Your own agent does the reasoning; the scripts do the mechanical work.
Safety
- Only visits URLs you provide; third-party origins are blocked during exploration.
- Exploration is read-only.
- No telemetry and no network calls beyond your target site and the standard Playwright install.
- The validator's denylist blocks generated specs that try to run shell commands, eval or read secrets.
What's included
SKILL.mdworkflow instructions- Scripts: explorer, spec validator, evidence summarizer, Playwright config template
- Reference docs: selector strategy, test conventions, evidence format, exploration inventory
- Two worked examples (TodoMVC and a login page) with real output
Requirements
Node.js 18+ and Playwright (npx playwright install chromium).
Limitations
Because exploration is read-only, the skill doesn't discover what a click leads to on its own. Tell your agent the expected outcome, or it will test that the control exists and works without asserting the destination.
Find more skills like this on the Claude Skills Marketplace, the Codex Skills Marketplace and the Gemini Skills Marketplace, or browse Claude Skills for Testing & Debugging.
Requires Node.js 18+ and Playwright with Chromium. Only visits URLs you provide. Exploration is read-only, so it won't discover what a click leads to on its own: tell your agent the expected outcome, or it tests that the control exists without asserting the destination. Can't automate CAPTCHAs. Submits forms with passwords or personal data only when you explicitly ask it to test that page. Doesn't crawl sitemaps or guess hidden routes.
How to use
- 1
Connect your agent to the Agensi MCP
Copy the prompt and paste it into Claude, ChatGPT, Cursor or any agent that supports MCP. It sets up the connection for you. Manual setup
- 2
Sign in to Agensi
Your agent shows a sign-in link. Sign in and click Allow.
- 3
Ask for what you need
Your agent loads this skill and uses it on your task. It always asks before buying a skill.
Reviews
No reviews yet
Be one of the first to try it. Every listed skill goes through the trust checks below.
Security scanned
Checked by our 8-point scan before listing
Fresh listing
Recently published to Agensi
Money-back guarantee
Doesn't do what its page promises? You get your money back.
Trust & safety
Security scan
Security scan passed 13 days ago
- Software
Node.jsPlaywright
Permissions
File Scopes
Shell runs the bundled Node scripts and Playwright. Setup installs @playwright/test via npm (package.json, package-lock.json, node_modules). Browser and network access are used only to visit the URLs you provide; third-party origins are blocked during exploration, which is read-only. Writes the page inventory to exploration/, generated specs to tests/, and evidence (screenshots, traces, REPORT.md, index.json) to evidence/. Creates playwright.config.ts only if you don't have one. Reads EVIDENCE_DIR to choose where evidence goes. No API keys, telemetry or external services.