Agent skill · software engineering · aiskillstore
browsing-with-playwright
Browser automation using Playwright MCP. Navigate websites, fill forms, click elements, take screenshots, and extract data. Use when tasks require web browsing, form submission, web scraping, UI testing, or any browser interaction. NOT when only fetching static content (use curl/wget instead).
Why this skill is useful
Adds executable scripts for browser automation with Playwright MCP, enabling complex web interactions that the AI cannot generate on its own.
What it needs
Requires playwright installed locally. About 2k tokens when loaded. Last updated 2026-08-07. 405 stars on the source repository.
What this skill does
Browser Automation Automate browser interactions via Playwright MCP server. Server Lifecycle Start Server Stop Server When to Stop End of task: Stop when browser work is complete Long sessions: Keep running if doing multiple browser tasks Errors: Stop and restart if browser becomes unresponsive Important: The --shared-browser-context flag is required to maintain browser state across multiple mcp-client.py calls. Without it, each call gets a fresh browser context. Quick Reference Navigation Get Page State Interact with Elements Use ref from snapshot output to target elements: Wait for Conditions Execute JavaScript Multi-Step Playwright Code For complex workflows, use browserruncode to run multiple actions in one call: Tip: Use browserruncode for complex multi-step operations that should be atomic (all-or-nothing). Workflow: Form Submission 1. Navigate to page 2. Get snapshot to find element refs 3. Fill form fields using refs 4. Click submit 5. Wait for confirmation 6. Screenshot result Workflow: Data Extraction 1. Navigate to page 2. Get snapshot (contains text content) 3. Use browserevaluate for complex extraction 4. Process results Verification Run: python3 scripts/verify.py Expected: ✓ Playwright MCP server running If Verification Fails 1. Run diagnostic: pgrep -f "@playwright/mcp" 2. Check: Server process running on port 8808 3. Try: bash scripts/start-server.sh 4. Stop and report if still failing - do not proceed with downstream steps Tool Reference See references/playwright-tools.md for complete tool documentation. Troubleshooting Issue Solution ------- ---------- Element not found Run browsersnapshot first to get current refs Click fails Try browserhover first, then click Form not submitting Use "submit": true with browsertype Page not loading Increase wait time or use browserwaitfor Server not responding Stop and restart: bash scripts/stop-server.sh && bash scripts/start-server.sh
How to use it
Reference it in AdaL, Claude Code, Cursor or any coding agent — nothing to install:
@skills aiskillstore/browsing-with-playwright