webapp-testing
Skill1 starsChanged 5 months agoMITView on GitHub
Provides Playwright patterns and best practices for web application testing. Covers DOM inspection, screenshot capture, form interaction, and API mocking. Works with the Playwright plugin for browser automation.
We split this skill into the rules it gives an agent
4 rules. 0 are common, 3 are distinctive, and 1 is very specific to this project.
0
Common
Most of the 191 edited versions we read keep these.
3
Distinctive
This author's own choices. Worth a look.
1
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Distinctive: line 7
Test local web applications using browser automation.
- Very specific: line 55
After snapshot, each element gets a unique ref (@e1, @e2):
- Distinctive: line 56
Deterministic: No CSS selector guessing
- Distinctive: line 57
Fast: No DOM re-querying
“Common” is measured: kept by at least 6 in 10 of the 191 edited versions of this file we could read. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.
Files
Web Application Testing
Test local web applications using browser automation.
Tool Selection
| Use Case | Tool | Why |
| AI agent browser interaction | agent-browser | AI-optimized refs, low token cost |
| Automated test suites (CI/CD) | Playwright | Rich assertions, parallelization |
| PDF generation from HTML | Puppeteer | Specialized PDF APIs |
| Visual regression testing | Playwright | Screenshot comparison |
Default: Use agent-browser for interactive testing, Playwright for test suites.
Decision Tree
- Is this AI-driven exploration or automated test suite?
- AI exploration: Use
agent-browser(refs system, AI-optimized) - Automated tests: Use Playwright (assertions, CI/CD)
- AI exploration: Use
- Is target static HTML or dynamic webapp?
- Static: Direct page load and inspect
- Dynamic: Use
with_server.pyhelper for server lifecycle
- Do you need visual or programmatic testing?
- Visual: Screenshots and visual comparison
- Programmatic: DOM queries and assertions
Agent-Browser (AI Agent Testing)
Install globally: bun add -g agent-browser
Quick Start
# Navigate and get AI-optimized snapshot
agent-browser navigate "http://localhost:3000"
agent-browser snapshot
# Interact using refs from snapshot
agent-browser click @e3
agent-browser fill @e5 "test@example.com"
agent-browser snapshot # Verify changesThe Refs Advantage
After snapshot, each element gets a unique ref (@e1, @e2):
- Deterministic: No CSS selector guessing
- Fast: No DOM re-querying
- AI-friendly: LLMs parse refs reliably
Common Patterns
# Login flow
agent-browser navigate "http://localhost:3000/login"
agent-browser snapshot
agent-browser fill @e2 "user@example.com"
agent-browser fill @e3 "password123"
agent-browser click @e4
agent-browser wait-for "Dashboard"
agent-browser snapshot
# Form submission
agent-browser navigate "http://localhost:3000/contact"
agent-browser snapshot
agent-browser fill @e1 "John Doe"
agent-browser fill @e2 "john@example.com"
agent-browser type @e3 "Hello, this is my message"
agent-browser click @e4 # Submit button
agent-browser wait-for "Thank you"See ~/.claude/context/agent-browser.md for full command reference.
Playwright (Automated Test Suites)
Setup
bun add -D playwright @playwright/test
bunx playwright installBasic Test Structure
import { test, expect } from '@playwright/test';
test('homepage loads correctly', async ({ page }) => {
await page.goto('http://localhost:3000');
// Wait for dynamic content
await page.waitForLoadState('networkidle');
// Check title
await expect(page).toHaveTitle(/My App/);
// Check element exists
await expect(page.locator('h1')).toContainText('Welcome');
});Critical Practice
Always wait for network idle on dynamic apps:
await page.waitForLoadState('networkidle');This prevents testing incomplete page states caused by ongoing JavaScript execution.
Element Selection
// By text
await page.getByText('Submit').click();
// By role
await page.getByRole('button', { name: 'Submit' }).click();
// By test ID (recommended)
await page.getByTestId('submit-button').click();
// By CSS selector
await page.locator('.submit-btn').click();
// By placeholder
await page.getByPlaceholder('Enter email').fill('test@example.com');Screenshots
// Full page
await page.screenshot({ path: 'screenshot.png', fullPage: true });
// Specific element
await page.locator('.header').screenshot({ path: 'header.png' });
// Hide elements
await page.screenshot({
path: 'clean.png',
mask: [page.locator('.ads')]
});Form Interaction
// Fill form
await page.getByLabel('Email').fill('user@example.com');
await page.getByLabel('Password').fill('secret123');
// Select dropdown
await page.getByLabel('Country').selectOption('US');
// Checkbox
await page.getByLabel('Remember me').check();
// Submit
await page.getByRole('button', { name: 'Sign In' }).click();API Mocking
await page.route('**/api/users', async (route) => {
await route.fulfill({
status: 200,
contentType: 'application/json',
body: JSON.stringify([{ id: 1, name: 'Test User' }])
});
});Console Logging
page.on('console', msg => {
console.log(`Browser console [${msg.type()}]: ${msg.text()}`);
});
page.on('pageerror', err => {
console.error('Page error:', err.message);
});Testing Dynamic Content
// Wait for element to appear
await page.waitForSelector('.loading', { state: 'hidden' });
await page.waitForSelector('.content', { state: 'visible' });
// Wait for specific text
await page.waitForFunction(() =>
document.body.innerText.includes('Data loaded')
);
// Wait for network request
const responsePromise = page.waitForResponse('**/api/data');
await page.click('#load-button');
const response = await responsePromise;Workflow Pattern
- Reconnaissance: Capture screenshots, inspect DOM
- Identify: Find selectors from rendered state
- Execute: Automate using discovered selectors
- Verify: Assert expected outcomes
// Reconnaissance
await page.screenshot({ path: 'before.png' });
console.log(await page.content());
// Find and interact
const buttons = await page.locator('button').all();
for (const btn of buttons) {
console.log(await btn.textContent());
}Other versions196 projects use a version of this.
Word for word · 0
None found.
Edited · 1
- pepebot-space/skills★ 211% same
Wrote their own version · 195
- anthropics/skills★ 186ksame name
- ComposioHQ/awesome-claude-skills★ 75ksame name
- github/awesome-copilot★ 41ksame name
- ComposioHQ/awesome-codex-skills★ 17ksame name
- composio-community/awesome-codex-skills★ 16ksame name
- vudovn/ag-kit★ 8.2ksame name
- vudovn/antigravity-kit★ 8.2ksame name
- Galaxy-Dawn/claude-scholar★ 5.9ksame name
- microsoft/FluidFramework★ 5ksame name
- Prat011/awesome-llm-skills★ 1.7ksame name
185 more not listed
How matches are found. Word for word: the exact same text. Edited: shares passages with this file (“99% same” means 99% of its five-word phrases also appear here; 10% or more counts). Their own version: similar meaning, or, weakest, the same name. We can’t tell which project had it first. Projects are counted among the 200 most-starred candidates, and mentions are links to the repository we found, up to 50 per site, so both counts are a floor.
Used alongsideProjects with it also use academy-guide, skill-share and 10 more.
Other files people use alongside this one.
Files found in the same public projects as a version of this one, more often than they turn up anywhere else. Each project counts once, large collections count for less, and this file's own repository is left out.
AnthropicSkillacademy-guide
Stop and check this skill before finishing any reply to a question about how to use Claude or a Claude product — it recommends matching courses, tutorials, and use cases from Claude Academy (academy.claude.com), Anthropic's learning hub. Trigger on: "how do I", "how can I", "getting started with", "what can Claude do", "teach me", "learn to use"; questions about artifacts, projects, skills, plugins, connectors, MCP; requests about rolling Claude out to a team, class, or organization; and any ask for training materials, onboarding content, or learning resources. Use it when the user is learning how to use a feature or product — not when they are mid-task and just want the task done. This skill composes with other skills: after consulting product documentation to answer how a Claude feature works, also check here for a matching course or tutorial — a docs-grounded answer and an Academy recommendation belong together. Only recommend on a strong match; never invent Academy content.
Also in 8 projects that use this
ArogyaReddySkillskill-share
A skill that creates new Claude skills and automatically shares them on Slack using Rube for seamless team collaboration and skill discovery.
Also in 23 projects that use this
SKB3002Skillintelligent-routing
Automatic agent selection and intelligent task routing. Analyzes user requests and automatically selects the best specialist agent(s) without requiring explicit user mentions.
Also in 5 projects that use this
ArogyaReddySkillraffle-winner-picker
Picks random winners from lists, spreadsheets, or Google Sheets for giveaways, raffles, and contests. Ensures fair, unbiased selection with transparency.
Also in 26 projects that use this
zephyrwang6Skilldeepl
Übersetzt Texte, Dokumente und XLIFF-Dateien via DeepL API. Verwende für Übersetzungen mit /deepl translate, /deepl file oder /deepl xliff.
Also in 4 projects that use this
zephyrwang6Skillimagemagick-conversion
Convert and manipulate images with ImageMagick. Covers format conversion, resizing, batch processing, quality adjustment, and image transformations. Use when user mentions image conversion, resizing images, ImageMagick, magick command, batch image processing, or thumbnail generation.
Also in 4 projects that use this
- +3 more from zephyrwang6
- +2 more from ArogyaReddy
In this repository54 other files it gives its agents.
- AGENTS.mdAGENTS.md
- skills/deep-recon/agents.mdAGENTS.md
- CLAUDE.mdCLAUDE.md
- adversarial-researchSkill
- algorithmic-artSkill
- api-integrationSkill
- breakdownSkill
- c4-architectSkill
- canvas-designSkill
- coding-agentsSkill
- compound-engineeringSkill
- context-budgetSkill
- counterfactualSkill
- critiqueSkill
- d3js-visualizationSkill
- data-analyst-agentSkill
- database-migrationsSkill
- deep-reconSkill
- design-tasteSkill
- doc-coauthoringSkill
- e2b-sandboxSkill
- ecosystem-auditSkill
- excalidraw-diagramSkill
- executing-plansSkill
- frontend-designSkill
- fullstack-agentSkill
- grillSkill
- kickoffSkill
- mcp-builderSkill
- model-migrationSkill
- naming-the-machineSkill
- full-output-enforcementSkill
- package-researchSkill
- pdf-generationSkill
- pp2pSkill
- pp3pSkill
- prompt-engineerSkill
- prompt-groundingSkill
- redesignSkill
- requesting-code-reviewSkill
- reverse-engineer-to-learnSkill
- review-changesSkill
- scratchpadSkill
- shipSkill
- slack-gif-creatorSkill
- sprint-architectSkill
- techdebtSkill
- test-and-fixSkill
- threat-modelSkill
- verification-before-completionSkill
- visual-verdictSkill
- web-asset-generatorSkill
- whatdidimissSkill
- writing-plansSkill
Does it work?
Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.
No reviews yet
People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.
- It worked
- Partly
- It didn't
Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.
Your trail
Files you open will collect here, so you can find them again.
Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.
Now do this for your own.
Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.

