Przejdź do treści
Biblioteka skilli
Programowanie · Automatyzacja

playwright-cli

/playwright-cli

Obsługuje automatyzację przeglądarki z Playwright z powłoki: sesje, snapshoty i referencje elementów, formularze, debugowanie testów, konsola, sieć, storage, zrzuty, ślady, wideo i generowanie kodu testów.

Repozytorium
webmaton ↗
Licencja
MIT
Ostatnia zmiana repozytorium
25.08.2026

Ocena i bezpieczeństwo

100/ 100Klasa: dobry
Format25 / 25
Frontmatter z nazwą i opisem, poprawna nazwa, opis do 1024 znaków, nazwa zgodna z folderem.
Odkrywalność25 / 25
Opis mówi, kiedy użyć skilla, ma sensowną długość i jest w 3. osobie.
Treść35 / 35
Co najmniej 150 słów i do 500 linii, nagłówki, listy kroków, przykłady albo kod.
Higiena15 / 15
Bez zaślepek typu TODO, bez ścieżek Windows, z licencją.
Ryzykobrak sygnałów w skanie
Pliki w paczce
11
Skrypty
0
Komentarze HTML
0
Adresy URL w SKILL.md
3
Przestarzałość

Brak sygnałów. Repozytorium zmienione 25.08.2026, bez odwołań do wycofanych modeli i API.

Licencja

MIT, otwarta: można używać i zmieniać, z zachowaniem informacji o autorze.

Co robi i kiedy

Obsługuje automatyzację przeglądarki z Playwright z powłoki: sesje, snapshoty i referencje elementów, formularze, debugowanie testów, konsola, sieć, storage, zrzuty, ślady, wideo i generowanie kodu testów.

Oryginalny opis (EN)

Use when a task needs Playwright-backed browser automation from the shell: open or attach to browser sessions, inspect snapshots and element refs, click/type/fill forms, debug Playwright tests, inspect console/network/storage, run Playwright snippets, capture screenshots/traces/videos, or generate reliable test code. Prefer for repeatable browser workflows and Playwright test work; not for static HTTP fetches, JSON APIs, or simple web search.

Jak działa

  1. Core Workflow
  2. Operating Rules
  3. Common Tasks
  4. Playwright Test Debugging
  5. References
Sekcje z nagłówków SKILL.md, w oryginale · 70 linii, 372 słów
Podgląd SKILL.md
---
name: playwright-cli
description: "Use when a task needs Playwright-backed browser automation from the shell: open or attach to browser sessions, inspect snapshots and element refs, click/type/fill forms, debug Playwright tests, inspect console/network/storage, run Playwright snippets, capture screenshots/traces/videos, or generate reliable test code. Prefer for repeatable browser workflows and Playwright test work; not for static HTTP fetches, JSON APIs, or simple web search."
---

# playwright-cli

`playwright-cli` is a token-efficient shell interface to Playwright. It keeps browser state across commands, exposes page snapshots with stable element refs such as `e15`, and prints the Playwright code it ran so the interaction can be converted into tests.

## Core Workflow

```bash
playwright-cli open https://example.com
playwright-cli snapshot
playwright-cli click e15
playwright-cli fill e5 "user@example.com"
playwright-cli press Enter
playwright-cli close
```

Use refs from the latest snapshot by default. Re-run `snapshot` after navigation, major DOM changes, or a failed ref action. Use CSS selectors or Playwright locators only when refs are unavailable or unstable.

## Operating Rules

- Discover exact syntax with `playwright-cli --help` and `playwright-cli <command> --help`; the CLI changes quickly.
- Use `--raw` when piping values into other tools. Use `--json` only if the installed CLI advertises it.
- Use named sessions with `-s=<name>` for concurrent or long-lived work.
- Use `open --persistent` only when disk-persisted cookies/storage are needed.
- Prefer `attach --cdp=chrome`, `attach --cdp=msedge`, or `attach --cdp=http://127.0.0.1:9222` when the task needs an existing browser/session.
- Close sessions when finished. Reserve `close-all` and `kill-all` for cleanup of stale sessions.

## Common Tasks

```bash
playwright-cli open https://example.com --browser=chrome
playwright-cli snapshot --depth=4
playwright-cli screenshot --filename=page.png
playwright-cli console warning
playwright-cli requests --filter="/api/.*"
playwright-cli request-headers 3
playwright-cli run-code "async page => await page.context().grantPermissions(['geolocation'])"
playwright-cli tracing-start
playwright-cli tracing-stop
```

For a broader command map, read `references/cli-reference.md`.

## Playwright Test Debugging

When a Playwright test fails, prefer the CLI debug workflow:

```bash
PLAYWRIGHT_HTML_OPEN=never npx playwright test --debug=cli
# wait for "Debugging Instructions", then attach to the printed session
playwright-cli attach tw-abcdef
```

Keep the test process running while inspecting the paused page. Use snapshots, console/network inspection, and generated Playwright code to identify the fix.

## References

Load only what the task needs:

- `references/cli-reference.md` — command groups, output modes, and version-sensitive features
- `references/playwright-tests.md` — running and debugging Playwright tests
- `references/request-mocking.md` — route mocking and request interception
- `references/running-code.md` — custom Playwright snippets with `run-code`
- `references/session-management.md` — named sessions and cleanup
- `references/storage-state.md` — cookies, localStorage, sessionStorage, auth state
- `references/test-generation.md` — turning CLI output into tests
- `references/tracing.md` — trace capture and inspection
- `references/video-recording.md` — WebM recording and chapter markers
- `references/element-attributes.md` — inspect IDs/classes/data attributes not shown in snapshots
Pliki w paczce (11)
  • SKILL.md 3 KB
  • references/cli-reference.md 3 KB
  • references/element-attributes.md 1 KB
  • references/playwright-tests.md 2 KB
  • references/request-mocking.md 2 KB
  • references/running-code.md 5 KB
  • references/session-management.md 5 KB
  • references/storage-state.md 5 KB
  • references/test-generation.md 2 KB
  • references/tracing.md 3 KB
  • references/video-recording.md 5 KB

Wersje

RepozytoriumWynikLicencja
Ta strona · appautomaton/webmaton100MIT
atc-net/atc-agentic-toolkit100MIT
thefrederiksen/devthrottle100MIT
zebbern/claude-code-guide100MIT
sanity-io/sanity100MIT
fugazi/test-automation-skills-agents100MIT
laurigates/claude-plugins100MIT
ulises-jeremias/agent-toolkit100MIT
testdino-hq/playwright-skill100MIT

Migawka bazy z 13.11.2026 · wersja paczki d3f83f32a8b7 (skrót SHA-256 całej paczki)

Pobrania w ostatnich 30 dniach: 0 · ranking

Zgłoś problem z tym skillem: szkodliwa treść, błędny opis albo prośba autora o usunięcie.

Podobne skille

  • 100browser-testing
    Automatyzuje testy w przeglądarce przez playwright-cli (inspekcja sieci, konsola, zrzuty, tracing) oraz Browser-Use MCP do autonomicznych przepływów, w tym testy E2E i analiza wydajności.
  • 84playwright
    Steruje prawdziwą przeglądarką do testów E2E przez @playwright/cli: sesje nazwane, snapshoty, zrzuty ekranu, przechwytywanie konsoli i sieci, mockowanie, tracing i wideo, z artefaktami zapisywanymi na dysk.
  • 100agent-browser
    Automatyzuje przeglądarkę przez CLI agent-browser Vercela jako alternatywę dla Playwright MCP: formularze, zrzuty ekranu i scraping z wyborem elementów przez referencje.
  • 100playwright
    Opisuje framework Playwright do testów E2E: automatyzację przeglądarki, asercje i generowanie testów, w tym lokatory, testy międzyprzeglądarkowe i regresję wizualną.
  • 100quality-engineering-playwright-cli
    Standaryzuje oszczędną w tokenach automatyzację przeglądarki przez playwright-cli, z Playwright MCP jako rezerwą, i zapisuje snapshoty aria, konsolę i zrzuty ekranu jako dowody.
  • 100playwright-testing
    Automatyzuje testy UI i E2E z Playwright MCP: sprawdza stronę, robi zrzuty ekranu, uruchamia Playwright i pisze testy przeglądarkowe.

Uwagi i zgłoszenia

Wiadomość trafi do Bartosza Sokolińskiego. Adres e-mail jest potrzebny tylko do odpowiedzi. Szczegóły w polityce prywatności.