Back to Skills

playwright-cli

verified

Playwright CLI expert for E2E testing and browser automation. Use when users need to record tests, debug issues, generate reports, or test across multiple browsers and devices.

View on GitHub

Marketplace

topographic-plugins-official

leobrival/topographic-plugins-official

Plugin

dev

development

Repository

leobrival/topographic-plugins-official

plugins/dev/skills/playwright-cli/SKILL.md

Last Verified

January 20, 2026

Install Skill

Select agents to install to:

Scope:
npx add-skill https://github.com/leobrival/topographic-plugins-official/blob/main/plugins/dev/skills/playwright-cli/SKILL.md -a claude-code --skill playwright-cli

Installation paths:

Claude
.claude/skills/playwright-cli/
Powered by add-skill CLI

Instructions

# Playwright CLI Guide

Playwright is a testing framework for automating browser interactions across multiple browsers (Chrome, Firefox, WebKit) and devices. This guide provides essential workflows and quick references for test execution, debugging, and debugging.

## Quick Start

```bash
# Install Playwright
npm install -D @playwright/test

# Install browsers
npx playwright install

# Run your first tests
npx playwright test

# Run with visible browser
npx playwright test --headed

# Debug with Inspector UI
npx playwright test --debug

# View test report
npx playwright show-report
```

## Common Workflows

### Workflow 1: Record and Test

```bash
# Record interaction with website
npx playwright codegen https://example.com -o tests/recorded.spec.ts

# Run the recorded test
npx playwright test tests/recorded.spec.ts

# Run with browser visible
npx playwright test tests/recorded.spec.ts --headed

# Update and verify
npx playwright test tests/recorded.spec.ts --debug
```

### Workflow 2: Debug Failing Test

```bash
# Run failing test with browser visible
npx playwright test -g "test name" --headed

# Open debugger Inspector
npx playwright test -g "test name" --debug

# Capture screenshot for inspection
npx playwright test --screenshot=on

# Record trace for detailed analysis
npx playwright test --trace on
npx playwright show-trace trace.zip
```

### Workflow 3: Test Across Browsers

```bash
# Run on all configured browsers
npx playwright test

# Run on specific browser
npx playwright test --project=chromium
npx playwright test --project=firefox
npx playwright test --project=webkit

# Run on mobile devices
npx playwright test --project="iPhone 12"
npx playwright test --project="Pixel 5"
```

### Workflow 4: Generate Comprehensive Report

```bash
# Run tests with multiple reports
npx playwright test --reporter=html --reporter=json --reporter=verbose

# View HTML report
npx playwright show-report

# Generate CI-compatible reports
npx playwright test --reporter=github --re

Validation Details

Front Matter
Required Fields
Valid Name Format
Valid Description
Has Sections
Allowed Tools
Instruction Length:
7041 chars