- Home
- Skills
- Idanbeck
- Claude Skills
- Playwright Skill
playwright-skill_skill
- Python
4
GitHub Stars
2
Bundled Files
2 months ago
Catalog Refreshed
4 months ago
First Indexed
Readme & install
Copy the install command, review bundled files from the catalogue, and read any extended description pulled from the listing source.
Installation
Preview and clipboard use veilstrat where the catalogue uses aiagentskills.
npx veilstrat add skill idanbeck/claude-skills --skill playwright-skill- playwright_skill.py17.0 KB
- SKILL.md7.1 KB
Overview
This skill automates browser interactions using Playwright to navigate pages, click, type, extract data, take screenshots, and save session state. It supports persistent named sessions so logged-in state and cookies can be reused across runs. Commands output JSON for easy scripting and integration.
How this skill works
The skill launches a Chromium browser (headless by default) and exposes CLI commands to open URLs, wait for selectors, interact (click/type), evaluate JavaScript, extract text/attributes, and capture screenshots or PDFs. Sessions are stored on disk and include cookies and localStorage so you can perform authenticated automation without re-logging. All operations return JSON for programmatic parsing.
When to use it
- Automating repetitive web tasks like filling forms or clicking through flows
- Scraping or extracting structured data from web pages
- Taking screenshots or PDFs of pages for reporting or QA
- Maintaining logged-in sessions for account-specific automation
- Debugging UI behavior by replaying interactions in a visible browser
Best practices
- Use named sessions for each account/site to avoid cookie clashes and simplify reuse
- Run the first login with --visible to capture authentication, then reuse the saved session headless
- Call wait before interacting with dynamic elements to reduce flakiness
- Take screenshots when a step fails to aid debugging
- Respect site terms of service and rate limits; add deliberate delays between actions when scraping
Example use cases
- Log in to a dashboard once (visible), then schedule headless data extraction from the account using the saved session
- Scrape article titles and links from a news site with extract --all and save results as JSON
- Automate filling and submitting a web form across multiple test accounts using named sessions
- Produce full-page screenshots or PDFs of pages for visual reports or archival
- Run eval to collect page metrics like title, element counts, or scroll position for QA scripts
FAQ
Open the site with --visible, sign in manually, then close the session name. Future runs with the same --session reuse cookies and localStorage saved to disk.
Can I see the browser while developing scripts?
Yes. Use the --visible flag to launch a non-headless browser so you can watch interactions and perform manual steps during setup or debugging.