webapp-testing
- Use it when:
- You need to check a web app running on your machine: click through it, take screenshots, read console logs.
- It does:
- Writes Python Playwright scripts against your app, starting your dev servers first and stopping them after.
- You get:
- A script you can rerun, and the screenshots, page content or logs it captures.
- Needs:
- Python with Playwright, which runs a headless Chromium.
- Unlike browser CLIs:
- With agent-browser or playwright-cli, the agent drives the browser one command at a time; with this one it writes and runs whole scripts.
TL;DR
Anthropic's toolkit for testing web apps you're building. The agent writes short Python scripts with Playwright and runs them in headless Chromium. A bundled helper starts one or more servers, say a backend and a frontend, waits until their ports answer, runs the script, then shuts them down. The skill gives the agent a decision path. For a static HTML file it reads the selectors straight from the file. For a live app it first loads the page and waits for network activity to settle, then takes a screenshot or reads the rendered page to find selectors, and only then clicks and types. Examples cover finding buttons, links and inputs, automating local HTML files, and capturing console logs.
Summarizes the skill at dbd4588.
npx skills add https://github.com/anthropics/skills --skill webapp-testing skills.sh pageSource on GitHubAll skills from anthropics/skills
- Total Downloads
- 200,862 on skills.sh, Nov 9, 2026
- Repo stars
- 189,830 anthropics/skills
- First seen
- Jan 19, 2026 on skills.sh
Weekly values
| Week to | Installs |
|---|---|
| Sep 21 | 4,539 |
| Sep 28 | 4,848 |
| Oct 5 | 4,968 |
| Oct 12 | 5,518 |
| Oct 19 | 6,132 |
| Oct 26 | 7,142 |
| Nov 2 | 6,780 |
| Nov 9 | 5,784 |
| Category |
Find root causes, review code and test what you built. Everything for building software: planning, coding, debugging, design, frameworks, cloud, agents and skills. |
|---|---|
| Type |
Operates a CLI, API, app or bundled script to get something done. |
| Effect |
Its own steps create or change files, git state or local tools. |
| Needs |
A specific command-line tool or desktop app must be installed, such as gh, agent-browser, LibreOffice, Obsidian or a vendor CLI. Drives a real Chromium or Chrome browser. |
| Publisher |
A verified publisher on skills.sh, or the company or maintainer behind the product the skill operates. |
| Topics | |
| Stack |
SKILL.md
From anthropics/skills at dbd4588. Checked daily, last changed Oct 20, 2026.
Frontmatter
name: webapp-testing
description: Toolkit for interacting with and testing local web applications using Playwright. Supports verifying frontend functionality, debugging UI behavior, capturing browser screenshots, and viewing browser logs.
license: Complete terms in LICENSE.txtWeb Application Testing
To test local web applications, write native Python Playwright scripts.
Helper Scripts Available:
scripts/with_server.py- Manages server lifecycle (supports multiple servers)
Always run scripts with --help first to see usage. DO NOT read the source until you try running the script first and find that a customized solution is abslutely necessary. These scripts can be very large and thus pollute your context window. They exist to be called directly as black-box scripts rather than ingested into your context window.
Decision Tree: Choosing Your Approach
User task → Is it static HTML?
├─ Yes → Read HTML file directly to identify selectors
│ ├─ Success → Write Playwright script using selectors
│ └─ Fails/Incomplete → Treat as dynamic (below)
│
└─ No (dynamic webapp) → Is the server already running?
├─ No → Run: python scripts/with_server.py --help
│ Then use the helper + write simplified Playwright script
│
└─ Yes → Reconnaissance-then-action:
1. Navigate and wait for networkidle
2. Take screenshot or inspect DOM
3. Identify selectors from rendered state
4. Execute actions with discovered selectors
Example: Using with_server.py
To start a server, run --help first, then use the helper:
Single server:
python scripts/with_server.py --server "npm run dev" --port 5173 -- python your_automation.py
Multiple servers (e.g., backend + frontend):
python scripts/with_server.py \
--server "cd backend && python server.py" --port 3000 \
--server "cd frontend && npm run dev" --port 5173 \
-- python your_automation.py
To create an automation script, include only Playwright logic (servers are managed automatically):
from playwright.sync_api import sync_playwright
with sync_playwright() as p:
browser = p.chromium.launch(headless=True) # Always launch chromium in headless mode
page = browser.new_page()
page.goto('http://localhost:5173') # Server already running and ready
page.wait_for_load_state('networkidle') # CRITICAL: Wait for JS to execute
# ... your automation logic
browser.close()
Reconnaissance-Then-Action Pattern
-
Inspect rendered DOM:
page.screenshot(path='/tmp/inspect.png', full_page=True) content = page.content() page.locator('button').all() -
Identify selectors from inspection results
-
Execute actions using discovered selectors
Common Pitfall
❌ Don't inspect the DOM before waiting for networkidle on dynamic apps
✅ Do wait for page.wait_for_load_state('networkidle') before inspection
Best Practices
- Use bundled scripts as black boxes - To accomplish a task, consider whether one of the scripts available in
scripts/can help. These scripts handle common, complex workflows reliably without cluttering the context window. Use--helpto see usage, then invoke directly. - Use
sync_playwright()for synchronous scripts - Always close the browser when done
- Use descriptive selectors:
text=,role=, CSS selectors, or IDs - Add appropriate waits:
page.wait_for_selector()orpage.wait_for_timeout()
Reference Files
- examples/ - Examples showing common patterns:
element_discovery.py- Discovering buttons, links, and inputs on a pagestatic_html_automation.py- Using file:// URLs for local HTMLconsole_logging.py- Capturing console logs during automation