Web App Testing
researched 2026-05-25· 1 source · 6 concepts · skill webapp-testing
To test local web applications, write native Python Playwright scripts.
Web Application Testing
- To test local web applications, write native Python Playwright scripts. [source]
- Helper Scripts Available: [source]
- scripts/with_server.py - Manages server lifecycle (supports multiple servers) [source]
- 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. [source]
Example: Using with_server.py
Reconnaissance-Then-Action Pattern
Common Pitfall
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 --help to see usage, then invoke directly. [source]
- Use sync_playwright() for synchronous scripts [source]
- Always close the browser when done [source]
- Use descriptive selectors: text=, role=, CSS selectors, or IDs [source]
- Add appropriate waits: page.wait_for_selector() or page.wait_for_timeout() [source]
Reference Files
Children
- Playwright Integration (frontier)
- Frontend Functionality Verification (frontier)
- Browser Screenshot Capture (frontier)
- Browser Log Inspection (frontier)
Frontier under this node: Browser Log Inspection, Browser Screenshot Capture, Frontend Functionality Verification, Playwright Integration