Browser Automation with playwright-cli

VerifiedSafe

Automate browser interactions using playwright-cli commands. Supports navigation, clicking, form filling, screenshots, data extraction, and multi-tab management. Ideal for web testing, scraping, and automating repetitive web tasks.

Sby Skills Guide Bot
TestingBeginner
6/2/2026
Claude CodeCursorWindsurfCopilotCodex
#browser-automation#web-testing#playwright-cli#form-filling#screenshot

Recommended for

Automated summary

Automates browser interactions for web testing, form filling, screenshots, and data extraction using a CLI tool.

Strengths

  • Simple and intuitive commands, wide range of actions (click, type, fill, screenshot, navigation), supports multiple sessions and tabs, debugging with console and network log.

Limitations

  • Requires element references from snapshots rather than CSS selectors, lacks built-in waiting mechanisms, may be limited for complex scenarios like iframes.
When to use it

For automating repetitive browser tasks such as form submissions, data extraction, or simple functional testing.

When not to use it

For complex end-to-end test suites that require robust element selection and explicit waits.

Security analysis

Safe
Quality score85/100

The skill provides documentation for the playwright-cli tool, a legitimate browser automation utility. No destructive, exfiltration, or obfuscated commands are present. It uses Bash but only to invoke safe, standard automation commands.

No concerns found

How this analysis is made

Examples

Take a screenshot of a webpage
Navigate to https://example.com and take a full-page screenshot.
Automate form submission
Go to https://example.com/login, fill in the email field with user@example.com and the password field with pass123, then click the submit button. Show me the result.
Extract page title and console logs
Open https://example.com, retrieve the page title, and also show the console logs on that page.

name: playwright-cli description: Automates browser interactions for web testing, form filling, screenshots, and data extraction. Use when the user needs to navigate websites, interact with web pages, fill forms, take screenshots, test web applications, or extract information from web pages. allowed-tools: Bash(playwright-cli:*)

Browser Automation with playwright-cli

Quick start

playwright-cli open https://playwright.dev
playwright-cli click e15
playwright-cli type "page.click"
playwright-cli press Enter

Core workflow

  1. Navigate: playwright-cli open https://example.com
  2. Interact using refs from the snapshot
  3. Re-snapshot after significant changes

Commands

Core

playwright-cli open https://example.com/
playwright-cli close
playwright-cli type "search query"
playwright-cli click e3
playwright-cli dblclick e7
playwright-cli fill e5 "user@example.com"
playwright-cli drag e2 e8
playwright-cli hover e4
playwright-cli select e9 "option-value"
playwright-cli upload ./document.pdf
playwright-cli check e12
playwright-cli uncheck e12
playwright-cli snapshot
playwright-cli eval "document.title"
playwright-cli eval "el => el.textContent" e5
playwright-cli dialog-accept
playwright-cli dialog-accept "confirmation text"
playwright-cli dialog-dismiss
playwright-cli resize 1920 1080

Navigation

playwright-cli go-back
playwright-cli go-forward
playwright-cli reload

Keyboard

playwright-cli press Enter
playwright-cli press ArrowDown
playwright-cli keydown Shift
playwright-cli keyup Shift

Mouse

playwright-cli mousemove 150 300
playwright-cli mousedown
playwright-cli mousedown right
playwright-cli mouseup
playwright-cli mouseup right
playwright-cli mousewheel 0 100

Save as

playwright-cli screenshot
playwright-cli screenshot e5
playwright-cli pdf

Tabs

playwright-cli tab-list
playwright-cli tab-new
playwright-cli tab-new https://example.com/page
playwright-cli tab-close
playwright-cli tab-close 2
playwright-cli tab-select 0

DevTools

playwright-cli console
playwright-cli console warning
playwright-cli network
playwright-cli run-code "async page => await page.context().grantPermissions(['geolocation'])"
playwright-cli tracing-start
playwright-cli tracing-stop
playwright-cli video-start
playwright-cli video-stop video.webm

Configuration

# configure the session
playwright-cli config my-config.json
# Configure named session
playwright-cli --session=mysession config my-config.json
# Start with configured session
playwright-cli open --config=my-config.json

Sessions

playwright-cli --session=mysession open example.com
playwright-cli --session=mysession click e6
playwright-cli session-list
playwright-cli session-stop mysession
playwright-cli session-stop-all
playwright-cli session-delete
playwright-cli session-delete mysession

Example: Form submission

playwright-cli open https://example.com/form
playwright-cli snapshot

playwright-cli fill e1 "user@example.com"
playwright-cli fill e2 "password123"
playwright-cli click e3
playwright-cli snapshot

Example: Multi-tab workflow

playwright-cli open https://example.com
playwright-cli tab-new https://example.com/other
playwright-cli tab-list
playwright-cli tab-select 0
playwright-cli snapshot

Example: Debugging with DevTools

playwright-cli open https://example.com
playwright-cli click e4
playwright-cli fill e7 "test"
playwright-cli console
playwright-cli network
playwright-cli open https://example.com
playwright-cli tracing-start
playwright-cli click e4
playwright-cli fill e7 "test"
playwright-cli tracing-stop

From the file to a first result

The download contains exactly the content displayed on this page. This copy may differ from the latest version in the source repository.

View the source and supporting files

This download contains SKILL.md only. Any scripts, references, templates and dependencies are not included. Get the required files from the source, preserving their directory structure, before continuing.

1. Download the file

Download SKILL.md

From the root of a test project, save the file as .skill-downloads/browser-automation-with-playwright-cli-mmbizjgt/SKILL.md, or use the command below. This folder is for inspecting the skill before installation.

Command for macOS/Linux or WSL: requires a POSIX shell and curl. On Windows without WSL, use the download button and create the folder manually.

mkdir -p '.skill-downloads/browser-automation-with-playwright-cli-mmbizjgt' && curl --fail --show-error --location 'https://skills-guides.com/api/skills/browser-automation-with-playwright-cli-mmbizjgt/download' --output '.skill-downloads/browser-automation-with-playwright-cli-mmbizjgt/SKILL.md.part' && mv '.skill-downloads/browser-automation-with-playwright-cli-mmbizjgt/SKILL.md.part' '.skill-downloads/browser-automation-with-playwright-cli-mmbizjgt/SKILL.md'

2. Check prerequisites

Read SKILL.md before using it. If it references scripts or external services, inspect them and prepare the required access in your test environment.

Tools declared by the author (check availability in your agent): Bash(playwright-cli:*)

No recognized prerequisites section in this file. This does not mean it is self-contained: libraries, tools and access requirements may be mentioned elsewhere in the content or source repository.

The platforms on this page are catalog indications. The paths below follow tool documentation; they do not prove this skill has been run in those tools. No minimum tool version is confirmed for this listing.

3. Load the skill

After inspection, copy the complete folder into your project using one of the commands below, then open a new tool session. The command stops if a folder with the same name already exists: compare the files before replacing it.

Claude Code
test -f '.skill-downloads/browser-automation-with-playwright-cli-mmbizjgt/SKILL.md' && test -s '.skill-downloads/browser-automation-with-playwright-cli-mmbizjgt/SKILL.md' && mkdir -p '.claude/skills' && test ! -e '.claude/skills/playwright-cli' && cp -R '.skill-downloads/browser-automation-with-playwright-cli-mmbizjgt' '.claude/skills/playwright-cli'

Cursor
test -f '.skill-downloads/browser-automation-with-playwright-cli-mmbizjgt/SKILL.md' && test -s '.skill-downloads/browser-automation-with-playwright-cli-mmbizjgt/SKILL.md' && mkdir -p '.cursor/skills' && test ! -e '.cursor/skills/playwright-cli' && cp -R '.skill-downloads/browser-automation-with-playwright-cli-mmbizjgt' '.cursor/skills/playwright-cli'

Codex
test -f '.skill-downloads/browser-automation-with-playwright-cli-mmbizjgt/SKILL.md' && test -s '.skill-downloads/browser-automation-with-playwright-cli-mmbizjgt/SKILL.md' && mkdir -p '.agents/skills' && test ! -e '.agents/skills/playwright-cli' && cp -R '.skill-downloads/browser-automation-with-playwright-cli-mmbizjgt' '.agents/skills/playwright-cli'

OpenSkills

OpenSkills must already be installed. The local install/read procedure is checked with OpenSkills 1.5.0, which requires Node.js ≥ 20.6.0. Catalog slugs are not resolved automatically.

Official OpenSkills installation
openskills install './.skill-downloads/browser-automation-with-playwright-cli-mmbizjgt'

openskills read 'browser-automation-with-playwright-cli-mmbizjgt'

Reading should display the installed file content and its base directory. It does not run the skill or install its dependencies.

For an agent that reads AGENTS.md, then sync the index. This command changes AGENTS.md: review the diff before using it.

openskills sync

Manual method or another tool: attach SKILL.md to a conversation, or open it in an agent that can read files. Include any required supporting resources. No universal folder is recognized by every tool.

4. Try a first task

Use a short, synthetic input: an API endpoint, a small document or an interface brief. In a new conversation, attach the file or give the agent its path, then adapt this request:

Read .skill-downloads/browser-automation-with-playwright-cli-mmbizjgt/SKILL.md and apply its instructions to this example: [describe a test input]. Identify any missing files, dependencies or access. Produce the result requested by the skill without inventing data or running unreviewed scripts.

Expected result: output matching the skill instructions, or a precise list of missing prerequisites. A read confirmation alone does not validate a first use. If an external resource is unavailable, that path remains untested.

Related skills