webapp-testing

Automates browser testing of local web applications using Python Playwright scripts.

8|3|Updated Oct 20, 2025
One-click install
npx skills add https://github.com/chongdashu/claude-code-skills-demo --skill webapp-testing-chongdashu
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: webapp-testing
Source: https://github.com/chongdashu/claude-code-skills-demo/tree/main/.claude/skills/webapp-testing
Command: npx skills add https://github.com/chongdashu/claude-code-skills-demo --skill webapp-testing-chongdashu

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill requires playwright, and includes scripts (resource) components.

What problem does it solve? Manually verifying frontend behavior, debugging UI issues, and capturing browser state for local web applications is repetitive and error-prone. This Skill automates those tasks with Playwright, including server startup, DOM inspection, screenshots, and console log capture. ## Core Features & Use Cases - Server Lifecycle Management: The with_server.py helper starts one or more servers (e.g., backend plus frontend), waits for ports to be ready, runs your automation, and cleans up. - Reconnaissance-Then-Action Pattern: Inspect the rendered DOM after networkidle, identify selectors, then execute clicks, form fills, and navigation. - Example Scripts: Ready-made patterns for element discovery, static HTML automation via file:// URLs, and console log capture. - Use Case: You are developing a React app on port 5173 and need to verify a login form works. The Skill starts the dev server, navigates headlessly, fills the form, submits it, and saves a screenshot of the result. ## Quick Start Ask the assistant to test your local web app with Playwright, for example: start my dev server on port 5173, open the page, click the login button, and take a screenshot.

Frequently Asked Questions about webapp-testing

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I test a local web app with Playwright in Python?

Write a script using sync_playwright, launch Chromium in headless mode, navigate to your localhost URL, and wait for networkidle before interacting. Use the with_server.py helper to start your dev server automatically before the script runs.

How do I run Playwright tests against a dev server that is not running yet?

Use the with_server.py helper script with --server and --port flags to start one or more servers, wait for the ports to respond, run your automation command, and shut everything down afterward.

Why does Playwright find no elements on my dynamic web page?

The DOM is likely inspected before JavaScript finishes rendering. Call page.wait_for_load_state('networkidle') after navigation, then take a screenshot or dump page content to discover the actual rendered selectors.

Can Playwright automate static HTML files without a server?

Yes. Convert the local file path to a file:// URL and pass it to page.goto. You can then click elements, fill forms, and capture screenshots exactly as with a served page.

How do I capture browser console logs with Playwright?

Register a handler with page.on('console', handler) before navigating. Each console message is passed to your callback, where you can print it or collect messages into a list and save them to a log file.