playwright-automation

Solid

Browser automation and testing with Playwright. Use when testing web applications, automating browser tasks, taking screenshots, or validating UI behavior.

AI & Automation 72 stars 10 forks Updated 2 weeks ago MIT

Install

View on GitHub

Quality Score: 87/100

Stars 20%
62
Recency 20%
90
Frontmatter 20%
70
Documentation 15%
100
Issue Health 10%
80
License 10%
100
Description 5%
100

Skill Content

# Playwright Browser Automation > Inspired by [lackeyjb/playwright-skill](https://github.com/lackeyjb/playwright-skill) and [anthropics/skills](https://github.com/anthropics/skills) ## Purpose Automate browser interactions for testing, scraping, and validation using Playwright. ## Core Workflow ### 1. Server Detection (for localhost testing) ```javascript // Check if dev server is running const http = require('http'); function checkServer(port) { return new Promise((resolve) => { const req = http.get(`http://localhost:${port}`, (res) => { resolve(true); }); req.on('error', () => resolve(false)); req.setTimeout(1000, () => { req.destroy(); resolve(false); }); }); } ``` ### 2. Script Creation Write test scripts to `/tmp/playwright-test-*.js`: ```javascript const { chromium } = require('playwright'); (async () => { // Configuration const URL = 'http://localhost:3000'; // Launch browser (visible by default) const browser = await chromium.launch({ headless: false }); const context = await browser.newContext(); const page = await context.newPage(); try { // Navigate and wait for load await page.goto(URL); await page.waitForLoadState('networkidle'); // Your automation here } catch (error) { console.error('Error:', error.message); await page.screenshot({ path: '/tmp/error-screenshot.png' }); } finally { await browser.close(); } })(); ``` ### 3. Execution ```bash # Run the script...

Details

Author
majiayu000
Repository
majiayu000/claude-arsenal
Created
6 months ago
Last Updated
2 weeks ago
Language
Python
License
MIT

Integrates with

Similar Skills

Semantically similar based on skill content — not just same category