What problem does it solve?
This Skill provides a robust toolkit for interacting with and testing local web applications, eliminating manual UI testing and debugging. It leverages Playwright to automate frontend functionality verification, capture screenshots, and view browser logs, saving significant time on QA.
Core Features & Use Cases
- Playwright Automation: Write native Python Playwright scripts for comprehensive web app testing.
- Server Lifecycle Management: Use
with_server.py to automatically start and stop local development servers.
- Reconnaissance-Then-Action: Inspect rendered DOM, identify selectors, and execute actions reliably.
- Use Case: Automate end-to-end tests for a new web application, ensuring all UI interactions, data submissions, and page navigations work as expected across different browsers.
Quick Start
Example: Using with_server.py to run a test
python scripts/with_server.py --server "npm run dev" --port 5173 -- python your_automation.py
Example: your_automation.py content
from playwright.sync_api import sync_playwright
with sync_playwright() as p:
browser = p.chromium.launch(headless=True)
page = browser.new_page()
page.goto('http://localhost:5173')
page.wait_for_load_state('networkidle')
# ... your automation logic
browser.close()