Logo di Playwright Qa Cli

Playwright Qa Cli

Community
EricTechPro
playwright-qa-cli

Automated QA testing using playwright-cli (CLI tool, NOT MCP tools). Provisions a test user, opens a headless browser, logs in, navigates to target pages, takes screenshots, and generates a REPORT.md. Two modes: VERIFY (reproduce a bug before fixing) and CHECK (confirm a fix works). Use this skill whenever the user says 'QA this', 'test this fix', 'verify this bug', 'smoke test', 'check if this works', 'reproduce this issue', 'run playwright QA', or 'playwright-qa-cli'. Also triggered from /fix-ticket at pre-fix and post-fix stages. Works for any page or user flow — not limited to specific features.

Add to TypingMind

Panoramica

Pubblicato daEricTechPro
Repositorystartup-claude-skills
Nome della skillplaywright-qa-cli
Stelle
59
Fork
17
File inclusi
4
LicenzaMIT
Link
  • Istruzioni in Markdown

    Un file SKILL.md che il modello carica quando serve, consumando token solo quando una richiesta è effettivamente pertinente.

  • Funziona con qualsiasi LLM

    Le skill IA sono in semplice Markdown, non in codice specifico di un fornitore, quindi funzionano con GPT, Claude, Gemini, Grok o un modello locale.

  • File inclusi: 4

    Script, template e riferimenti che il modello può leggere mentre lavora. I file sono di sola lettura e non vengono mai eseguiti.

  • Open source

    Pubblicata da EricTechPro su GitHub. Leggi i sorgenti prima di installarla.

Installazione

Installa la skill IA Playwright Qa Cli in TypingMind per usarla con qualsiasi LLM, oppure copiala in un altro agente in grado di leggere SKILL.md.

1

Installa in TypingMind

TypingMind installa una skill direttamente dalla sua cartella GitHub: legge SKILL.md, raccoglie i file delle risorse e salva il risultato in locale.

  1. Apri l'app e vai su Plugin → Skill.
  2. Scegli "Installa da GitHub".
  3. Incolla l'URL della cartella della skill riportato qui sotto e conferma.
    https://github.com/EricTechPro/startup-claude-skills/tree/main/skills/playwright-qa-cli
  4. Attiva la skill in ogni chat in cui vuoi averla a disposizione.
Plugin → Skill → Aggiungi skill → Da URL GitHub, poi incolla l'URL della cartella e premi Continua.
2

Installa in un altro agente

Qualsiasi agente che legge il formato Agent Skills può usare questa skill: copia la cartella della skill nella directory delle skill di quell'agente.

Claude Code — .claude/skills
git clone --depth 1 https://github.com/EricTechPro/startup-claude-skills.git /tmp/startup-claude-skills
mkdir -p .claude/skills
cp -r /tmp/startup-claude-skills/skills/playwright-qa-cli .claude/skills/playwright-qa-cli
Dopo la copia, riavvia Claude Code per caricare la nuova skill.

Usala in TypingMind

Attiva Playwright Qa Cli in qualsiasi chat di TypingMind e al resto pensa il modello. Il nome e la descrizione della skill sono nel prompt di sistema e, non appena arriva una richiesta pertinente, il modello carica da solo le istruzioni complete: non devi mai richiamarla manualmente e non consuma token finché non viene effettivamente usata.

Il modello carica automaticamente Playwright Qa Cli non appena riceve una richiesta pertinente.

Funziona con qualsiasi modello IA

Le skill IA sono semplici istruzioni in Markdown, non codice specifico di un fornitore, quindi Playwright Qa Cli non è vincolata al modello per cui è stata scritta. Installala una sola volta in TypingMind e usala con GPT-5, Claude, Gemini, Grok, DeepSeek, Mistral, Llama o un modello locale che esegui tu, sempre con le tue chiavi API.

  • Caricata solo quando serve

    Il prompt di sistema contiene solo il nome e la descrizione. Le istruzioni vengono recuperate alla prima richiesta pertinente, quindi una skill inutilizzata non costa nulla.

  • Cambia modello durante la chat

    Poiché la skill è composta da istruzioni e non da codice, continua a funzionare anche se cambi modello: il nuovo modello legge lo stesso file SKILL.md.

Istruzioni della skill

Questo è il contenuto di SKILL.md che il modello carica. Leggilo prima dell'installazione: una skill è un insieme di istruzioni che il tuo modello seguirà.

Playwright QA (CLI Variant)

Automated headless-browser QA using playwright-cli bash commands. Provisions a test user, logs in, navigates to target pages, screenshots each step, generates REPORT.md, cleans up.

CRITICAL: No MCP Tools

Do NOT use any mcp__plugin_playwright_playwright__* tools. Use ONLY playwright-cli bash commands via the Bash tool. If playwright-cli is not found, STOP and ask user to install — do NOT fall back to MCP tools.

PATH Setup — REQUIRED

Prefix EVERY playwright-cli bash command with:

bash
export PATH="$HOME/.npm-global/bin:$PATH" && playwright-cli ...

Parameters

ParameterDefaultExampleDescription
baseprodlocalprod = CONFIG.md PROD_URL, local = http://localhost:3000
modecheckverifyverify = reproduce bug, check = confirm fix
urlauto-detect/dashboard/receiptsPage to test
change_descriptionfrom git diff"Fixed button overflow"What to verify
ticket_idnonePROJ-123Issue tracker ticket (folder naming)
skip_cleanupfalsetrueKeep test user alive

Configuration

All project-specific settings are defined in CONFIG.md at the root of this skill directory. Before first use, copy CONFIG.example.md to CONFIG.md and fill in your values.

SettingSource
Test EmailCONFIG.md → TEST_USER_EMAIL
Test PasswordCONFIG.md → TEST_USER_PASSWORD
Supabase Project IDCONFIG.md → SUPABASE_PROJECT_ID
Production URLCONFIG.md → PROD_URL
Viewport1440x900

Password note: Avoid !, \, $ in test passwords — playwright-cli fill escapes shell-special characters.

Execution Flow

Phase 1:   Setup (mkdir screenshots, detect route from git diff)
Phase 1.5: Dev server (local only — check port 3000, start if needed)
Phase 2:   Provision test user → read references/provision.md
Phase 3:   Login via CLI → use state-save for auth persistence
Phase 4:   Navigate & test target page
Phase 5:   Cleanup → read references/cleanup.md + playwright-cli close
Phase 6:   Generate REPORT.md → read references/report-templates.md

Phase 1: Setup

bash
mkdir -p playwright-qa-screenshots/{test-name}-{mode}

{test-name} = kebab-case from ticket ID or change description. {mode} = -verify or -check.

Route detection (if no url param): run git diff --name-only HEAD, map files to routes.

Customize the route detection table in CONFIG.md. Example format:

File PatternRoute
app/dashboard/page-a/**, components/page-a/**/dashboard/page-a
app/dashboard/page-b/**, components/page-b/**/dashboard/page-b
app/dashboard/settings/**/dashboard/settings
Default/dashboard

Phase 1.5: Dev Server (Local Only)

Skip if base=prod. Check lsof -ti:3000. If no server, start npm run dev in background, poll until ready (max 30s). Set WE_STARTED_SERVER flag for cleanup.

Phase 2: Provision Test User

Read references/provision.md and follow it exactly. It contains the complete Admin API flow, reset SQL, business profile creation, credits setup, and email verification.

Phase 3: Login via Playwright CLI

Open browser and navigate

bash
export PATH="$HOME/.npm-global/bin:$PATH" && playwright-cli open "{base_url}/sign-in"
export PATH="$HOME/.npm-global/bin:$PATH" && playwright-cli resize 1440 900
export PATH="$HOME/.npm-global/bin:$PATH" && playwright-cli screenshot --filename=playwright-qa-screenshots/{test-name}/01-sign-in-page.png
export PATH="$HOME/.npm-global/bin:$PATH" && playwright-cli snapshot

Find element refs and fill login form

Read the snapshot output to find element refs (e.g., e93 for Email, e99 for Password, e104 for Sign In). Refs change between pages — always snapshot before interacting.

bash
export PATH="$HOME/.npm-global/bin:$PATH" && playwright-cli fill {email-ref} "{TEST_USER_EMAIL}"
export PATH="$HOME/.npm-global/bin:$PATH" && playwright-cli fill {password-ref} "{TEST_USER_PASSWORD}"
export PATH="$HOME/.npm-global/bin:$PATH" && playwright-cli click {submit-ref}

Wait for navigation and verify

After clicking login, wait for the page to settle before taking a snapshot. Use eval to check readiness instead of a blind sleep:

bash
export PATH="$HOME/.npm-global/bin:$PATH" && playwright-cli eval "() => new Promise(r => setTimeout(r, 3000))"
export PATH="$HOME/.npm-global/bin:$PATH" && playwright-cli snapshot
export PATH="$HOME/.npm-global/bin:$PATH" && playwright-cli screenshot --filename=playwright-qa-screenshots/{test-name}/02-after-login.png

Why 3s here: Auth redirects involve a server round-trip + client-side redirect chain. This is one of the few places a timed wait is appropriate because there's no single DOM element that reliably signals "auth complete + redirect finished."

Verify redirect target

Customize these redirect targets in CONFIG.md to match your app's auth flow:

URL ContainsMeaningAction
/dashboardLogin succeededContinue to Phase 4
/verify-emailMissing email verificationFix via provision.md, retry
/setup or /onboardingMissing profile/onboardingRe-run provision setup, retry
/sign-inLogin failedRecreate user via Admin API

Save auth state (optional but recommended)

If you'll navigate multiple pages, save auth state to skip re-login on session loss:

bash
export PATH="$HOME/.npm-global/bin:$PATH" && playwright-cli state-save playwright-qa-screenshots/{test-name}/auth-state.json

Restore later with playwright-cli state-load if the session drops.

Phase 4: Navigate & Test

Read references/cli-patterns.md for detailed interaction patterns (waiting, forms, dialogs, file uploads, scrolling, error checking). The patterns below are a summary.

Navigate to target page

bash
export PATH="$HOME/.npm-global/bin:$PATH" && playwright-cli goto "{base_url}{target_route}"

Wait for page to load

Use eval to wait for a meaningful signal rather than a blind sleep:

bash
# Wait for network idle (no pending fetches for 500ms)
export PATH="$HOME/.npm-global/bin:$PATH" && playwright-cli eval "() => new Promise(resolve => { let timer; const check = () => { timer = setTimeout(resolve, 500); }; const observer = new PerformanceObserver(() => { clearTimeout(timer); check(); }); observer.observe({entryTypes: ['resource']}); check(); })"

If that's too complex for the situation, a simple 2-3s wait is acceptable — just document why:

bash
# Simple wait — acceptable when page has heavy async rendering
export PATH="$HOME/.npm-global/bin:$PATH" && playwright-cli eval "() => new Promise(r => setTimeout(r, 2000))"

Snapshot + screenshot

bash
export PATH="$HOME/.npm-global/bin:$PATH" && playwright-cli snapshot
export PATH="$HOME/.npm-global/bin:$PATH" && playwright-cli screenshot --filename=playwright-qa-screenshots/{test-name}/03-target-page.png

Mode-specific testing

verify mode: Reproduce bug steps from ticket using CLI commands. Screenshot each step. Check playwright-cli console error for JS errors. Verdict: "Bug confirmed" or "Not reproducible".

check mode: Inspect snapshot for error indicators. Verify expected UI elements are present. Run change-specific checks. Check console for errors.

Expected elements by route

Customize this table in CONFIG.md to match your application's routes and expected elements:

RouteExpected Elements
/dashboardMain dashboard content, navigation
/dashboard/page-aPage A content or empty state
/dashboard/page-bPage B content or empty state
/dashboard/settingsSettings form

Key interaction commands

ActionCommand
Click elementplaywright-cli click {ref}
Fill inputplaywright-cli fill {ref} "text"
Type text (keystroke)playwright-cli type "text"
Select dropdownplaywright-cli select {ref} "value"
Upload fileplaywright-cli upload "/absolute/path/to/file"
Check checkboxplaywright-cli check {ref}
Press keyplaywright-cli press Enter / press Tab / press Escape
Scroll downplaywright-cli mousewheel 0 500
Full-page screenshotplaywright-cli screenshot --full-page --filename=...
Check JS errorsplaywright-cli console error
Check networkplaywright-cli network
Accept dialogplaywright-cli dialog-accept
Dismiss dialogplaywright-cli dialog-dismiss
Evaluate JSplaywright-cli eval "() => document.title"

Golden rule: Always snapshot before interacting with a new page. Element refs are page-specific and change after navigation or significant DOM updates.

Phase 5: Cleanup

Read references/cleanup.md and execute the SQL via your Supabase SQL execution tool. Then:

bash
export PATH="$HOME/.npm-global/bin:$PATH" && playwright-cli close

If WE_STARTED_SERVER, kill port 3000: lsof -ti:3000 | xargs kill 2>/dev/null

If skip_cleanup=true, skip the SQL cleanup but still close the browser.

Phase 6: Report

Read references/report-templates.md and generate REPORT.md in the screenshots folder using the Write tool.

Error Handling

ScenarioAction
playwright-cli not foundSTOP. Tell user: npm install -g playwright-cli. Do NOT use MCP.
Stale browser sessionplaywright-cli kill-all then retry open
Login redirect to verify-emailFix email verification (see provision.md)
Login redirect to setup/onboardingRe-run profile creation (provision.md)
Login redirect back to sign-inRecreate user via Admin API
Element ref not foundRe-run snapshot — refs may have changed after DOM update
Supabase MCP unavailableSkip provisioning, ask user to log in manually
Cleanup failsLog warning, continue
Page shows loading spinnerWait with eval, then re-snapshot

File inclusi

Il modello legge questi file quando servono, mentre la skill è caricata. Sono accessibili in sola lettura e non vengono mai eseguiti.

Domande frequenti

Cosa fa la skill IA Playwright Qa Cli?

Automated QA testing using playwright-cli (CLI tool, NOT MCP tools). Provisions a test user, opens a headless browser, logs in, navigates to target pages, takes screenshots, and generates a REPORT.md. Two modes: VERIFY (reproduce a bug before fixing) and CHECK (confirm a fix works). Use this skill whenever the user says 'QA this', 'test this fix', 'verify this bug', 'smoke test', 'check if this works', 'reproduce this issue', 'run playwright QA', or 'playwright-qa-cli'. Also triggered from /fix-ticket at pre-fix and post-fix stages. Works for any page or user flow — not limited to specific...

Perché usare Playwright Qa Cli su TypingMind?

Perché la installi una volta e la usi con qualsiasi modello. Playwright Qa Cli è scritta in semplice Markdown anziché in codice specifico di un fornitore, quindi la stessa skill funziona con GPT-5, Claude, Gemini, Grok o un modello locale, e puoi cambiare modello durante la chat senza che la skill smetta di funzionare. TypingMind usa le tue chiavi API, quindi paghi direttamente i fornitori anziché un abbonamento per posto utente, e le tue skill e chat restano nel tuo spazio di archiviazione.

Come installo Playwright Qa Cli in TypingMind?

Apri Plugin → Skill → Installa da GitHub in TypingMind e incolla https://github.com/EricTechPro/startup-claude-skills/tree/main/skills/playwright-qa-cli. TypingMind legge il file SKILL.md, include i file associati e installa la skill, che puoi abilitare per ogni singola chat.

Quali modelli IA possono usare Playwright Qa Cli?

Qualsiasi modello che colleghi a TypingMind. Le skill IA sono semplici istruzioni in Markdown anziché codice specifico di un fornitore, quindi GPT, Claude, Gemini, Grok e i modelli locali possono tutti caricare questa skill quando una richiesta corrisponde al suo scopo.

Quanti modelli IA posso usare con Playwright Qa Cli?

Quanti ne vuoi. Se un modello supporta le skill, puoi usarlo con Playwright Qa Cli: GPT, Claude, Gemini, Grok, DeepSeek, Mistral, Llama e molti altri, tutti su TypingMind con le tue chiavi API.

La skill IA Playwright Qa Cli è gratuita?

Sì. È pubblicata su GitHub da EricTechPro con licenza MIT. Paghi solo il tuo fornitore IA per i token che usi.

Cosa sono le skill IA?

Una skill IA è un pacchetto di istruzioni riutilizzabili che insegna a un modello IA come svolgere un'attività specifica. Segue il formato aperto Agent Skills: un file SKILL.md con un nome e una descrizione, più eventuali script, template o file di riferimento di cui il modello potrebbe aver bisogno. Il modello legge le istruzioni solo quando la tua richiesta corrisponde alla skill, quindi una skill installata non comporta costi finché non viene usata.

In cosa si differenziano le skill IA dai plugin o dai server MCP?

Un plugin o un server MCP fornisce a un modello nuovi strumenti da richiamare: codice che viene eseguito da qualche parte e restituisce un risultato. Una skill IA, invece, fornisce al modello conoscenze e procedure: come affrontare un'attività, quali passaggi seguire e quali caratteristiche deve avere un buon output. Le skill sono semplici istruzioni in Markdown, quindi non richiedono server, chiavi API né ambienti di esecuzione e funzionano con qualsiasi modello.

Elenco completo

Crea subito il tuo spazio di lavoro AI

Iscriviti alla nostra newsletter per ricevere aggiornamenti sulle nuove funzionalità e sulle prossime iniziative a premi 👇