Web Application Testing
To test local web applications, write native Python Playwright scripts.
Core Capabilities
- •Browser Automation: Interact with web elements (clicks, typing, navigation).
- •Verification: Assert page states, content, and behavior.
- •Diagnostics: Capture screenshots, view console logs, and network history.
- •Server Management: Automated startup/shutdown of local dev servers.
Reconnaissance-Then-Action Pattern
- •Navigate and Wait: Go to the URL and wait for
networkidle. - •Inspect: Take screenshot or inspect DOM to identify selectors.
- •Execute: Perform actions using discovered selectors.
Best Practices
- •Always use
networkidlestate before interacting with dynamic apps. - •Use headless mode for CI/automation.
- •Prefer descriptive selectors (role, text) over brittle CSS paths.
- •Clean up browser instances after testing.