Web App Testing
Test local web applications using Playwright for UI verification and debugging
What is it?
A toolkit for interacting with and testing local web applications using Playwright. It supports verifying frontend functionality, debugging UI behavior, capturing browser screenshots, and viewing browser logs. The skill provides helper scripts for managing server lifecycle and emphasizes a reconnaissance-then-action pattern for effective browser automation.
How to use it?
Testing follows a decision tree based on the application type:
For Static HTML:
- Read the HTML file directly to identify selectors
- Write Playwright script using discovered selectors
- If incomplete, treat as dynamic
For Dynamic Web Apps:
-
If server not running - Use
scripts/with_server.pyto manage server lifecycle:python scripts/with_server.py --server "npm run dev" --port 5173 -- python your_test.pySupports multiple servers (e.g., backend + frontend)
-
Reconnaissance-then-action pattern:
- Navigate and wait for networkidle (CRITICAL for dynamic apps)
- Take screenshot or inspect DOM
- Identify selectors from rendered state
- Execute actions with discovered selectors
Key Pattern:
page.goto('http://localhost:5173')
page.wait_for_load_state('networkidle') # Wait for JS to execute
page.screenshot(path='/tmp/inspect.png') # Inspect first
# Then perform actions
Key Features
- Playwright-based browser automation with full JavaScript support
- Server lifecycle management - Helper script handles starting/stopping servers
- Multi-server support - Run backend + frontend simultaneously
- Reconnaissance-then-action pattern - Inspect before acting
- Screenshot capture for visual debugging and verification
- Console log capture for debugging JavaScript issues
- Element discovery helpers - Find buttons, links, inputs on dynamic pages
- Static HTML automation support via file:// URLs
- Headless mode for CI/CD integration
Related Skills
More from Developer ToolsSuperpowers
A comprehensive workflow system for Claude with 20 proven development techniques
test-fixing
Detect failing tests and propose patches or fixes
iOS Simulator Skill
21 production-ready scripts for iOS app testing, building, and automation with semantic UI navigation