enactplaywright

while-basic's avatarfrom while-basic

Browser automation tool using Playwright - captures screenshots and extracts content from web pages

⭐0stars🔀0forks📁View on GitHub🕐Updated Dec 31, 2025

When & Why to Use This Skill

This Claude skill leverages Playwright to provide robust browser automation capabilities, allowing users to programmatically navigate websites, capture high-quality screenshots, and extract specific text or HTML content using CSS selectors. It bridges the gap between AI and live web data, enabling seamless web scraping, visual monitoring, and automated content retrieval.

Use Cases

  • Web Scraping & Data Extraction: Automatically retrieve text or HTML from specific web elements using CSS selectors for data analysis or research.
  • Visual Auditing & Monitoring: Capture high-resolution screenshots of web pages to track layout changes, verify UI rendering, or archive digital content.
  • Automated Content Gathering: Fetch clean text from articles, documentation, or news sites to provide up-to-date context for AI-driven summaries.
  • Web Element Verification: Programmatically check for the presence or state of specific components on a webpage to ensure site functionality or availability.
nameenact/playwright
version1.0.0
descriptionOptional CSS selector to target specific element
frommcr.microsoft.com/playwright:v1.50.0-noble
commandnode /workspace/run.js '${url}' '${action}' '${selector}'
timeout600s
typestring
defaultbody

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 ./playwright --args '{"url": "https://example.com"}'

# Take a screenshot
enact run ./playwright --args '{"url": "https://example.com", "action": "screenshot"}'

# Extract text from a specific element
enact run ./playwright --args '{"url": "https://example.com", "selector": "h1"}'