enactplaywright
Browser automation tool using Playwright - captures screenshots and extracts content from web pages
When & Why to Use This Skill
The Playwright Browser Automation skill empowers Claude with robust web interaction capabilities, enabling seamless navigation, high-fidelity screenshot capture, and precise data extraction. By leveraging Playwright, this tool allows users to programmatically retrieve text or HTML content from any URL using CSS selectors, bridging the gap between AI reasoning and real-time web data for enhanced research and monitoring workflows.
Use Cases
- Web Scraping & Data Extraction: Automatically extract specific information like product prices, news headlines, or contact details from websites using CSS selectors.
- Visual UI Testing: Capture screenshots of web pages to verify layout consistency, identify rendering issues, or document visual changes over time.
- Real-time Content Monitoring: Fetch and analyze the latest text content from dynamic web pages to stay updated on market trends or competitor announcements.
- SEO & Technical Audits: Extract metadata, header structures (H1-H6), and HTML elements to evaluate on-page SEO performance and site architecture.
| name | enact/playwright |
|---|---|
| version | 1.0.0 |
| description | Optional CSS selector to target specific element |
| from | mcr.microsoft.com/playwright:v1.50.0-noble |
| command | node /workspace/run.js '${url}' '${action}' '${selector}' |
| timeout | 600s |
| type | string |
| default | body |
Playwright Browser Automation
A browser automation tool that uses Playwright to interact with web pages.
Features
- Navigate to any URL
- Take screenshots
- Extract text content
- Extract HTML content
- Target specific elements with CSS selectors
Usage
# Get text content from a page
enact run enact/playwright --args '{"url": "https://example.com"}'
# Take a screenshot
enact run enact/playwright --args '{"url": "https://example.com", "action": "screenshot"}'
# Extract text from a specific element
enact run enact/playwright --args '{"url": "https://example.com", "selector": "h1"}'