Web Application Testing

To test local web applications, write native Python Playwright scripts.

Decision Tree

User task → Is it static HTML?
    ├─ Yes → Read HTML file directly
    └─ No (dynamic webapp) → Is the server already running?
        ├─ No → Use with_server.py helper
        └─ Yes → Reconnaissance-then-action

Best Practices

  • Use sync_playwright() for synchronous scripts
  • Always close the browser when done
  • Use descriptive selectors: text=, role=, CSS selectors, or IDs
  • Wait for page.wait_for_load_state('networkidle') before inspection on dynamic apps

Reference Files

  • examples/ - Examples showing common patterns:
    • element_discovery.py - Discovering buttons, links, and inputs on a page
    • static_html_automation.py - Using file:// URLs for local HTML
    • console_logging.py - Capturing console logs during automation

Invokes / Invoked by

Invokes: SKILL, SKILL Invoked by: _summary, _summary, _summary