Logo de Playwright Qa Cli

Playwright Qa Cli

Comunidade
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

Visão geral

Publicado porEricTechPro
Repositóriostartup-claude-skills
Nome da habilidadeplaywright-qa-cli
Estrelas
59
Forks
17
Arquivos incluídos
4
LicençaMIT
Links
  • Instruções em Markdown

    Um arquivo SKILL.md que o modelo carrega sob demanda, consumindo tokens apenas quando uma solicitação é realmente relevante para a habilidade.

  • Funciona com qualquer LLM

    As habilidades de IA são escritas em Markdown simples, não em código específico de um provedor. Por isso, funcionam com GPT, Claude, Gemini, Grok ou um modelo local.

  • Arquivos incluídos: 4

    Scripts, templates e referências que o modelo pode ler enquanto trabalha. Os arquivos são somente para leitura e nunca são executados.

  • Código aberto

    Publicada por EricTechPro no GitHub. Leia os arquivos da habilidade antes de instalá-la.

Instalação

Instale a habilidade de IA Playwright Qa Cli no TypingMind para usá-la com qualquer LLM ou adicione-a a outro agente que leia SKILL.md.

1

Instalar no TypingMind

O TypingMind instala uma habilidade diretamente da pasta dela no GitHub — lê o arquivo SKILL.md, reúne os arquivos de recursos em um pacote e armazena o resultado localmente.

  1. Abra o app e vá para Plugins → Habilidades.
  2. Escolha "Instalar do GitHub".
  3. Cole a URL abaixo, que aponta para a pasta da habilidade, e confirme.
    https://github.com/EricTechPro/startup-claude-skills/tree/main/skills/playwright-qa-cli
  4. Ative a habilidade em cada chat em que quiser disponibilizá-la.
Plugins → Habilidades → Adicionar habilidade → Via URL do GitHub. Depois, cole a URL da pasta e pressione Continuar.
2

Instalar em outro agente

Qualquer agente que leia o formato Agent Skills pode usar esta habilidade — copie a pasta para o diretório de habilidades desse 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
Reinicie Claude Code após copiar para que a nova habilidade seja reconhecida.

Use no TypingMind

Ative Playwright Qa Cli em qualquer chat do TypingMind e o modelo cuida do resto. O nome e a descrição da habilidade ficam no prompt do sistema e, assim que uma solicitação relevante aparece, o modelo carrega as instruções completas automaticamente — sem precisar de acionamento manual e sem consumir tokens até que ela seja realmente usada.

O modelo carrega Playwright Qa Cli automaticamente assim que uma solicitação é relevante para essa habilidade.

Funciona com qualquer modelo de IA

Habilidades de IA são instruções em Markdown simples, não código específico de um provedor. Por isso, Playwright Qa Cli não fica vinculada ao modelo para o qual foi criada. Instale-a uma vez no TypingMind e use-a com GPT-5, Claude, Gemini, Grok, DeepSeek, Mistral, Llama ou um modelo local executado por conta própria — tudo com suas próprias chaves de API.

  • Carregada apenas quando necessário

    O prompt do sistema contém apenas o nome e a descrição. As instruções são buscadas na primeira solicitação relevante, então uma habilidade sem uso não gera custo.

  • Troque de modelo durante a conversa

    Como a habilidade é composta de instruções, não de código, trocar de modelo não afeta seu funcionamento — o próximo modelo lê o mesmo arquivo SKILL.md.

Instruções da habilidade

Este é o conteúdo de SKILL.md que o modelo carrega. Leia antes de instalar — uma habilidade é um conjunto de instruções que seu modelo 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

Arquivos incluídos

O modelo lê esses arquivos sob demanda enquanto a habilidade está carregada. Eles são disponibilizados para leitura e nunca são executados.

Perguntas frequentes

O que a habilidade de IA Playwright Qa Cli faz?

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...

Por que usar Playwright Qa Cli no TypingMind?

Porque basta instalar uma vez para usar com qualquer modelo. A habilidade Playwright Qa Cli é escrita em Markdown simples, e não em código específico de um provedor, então a mesma habilidade funciona com GPT-5, Claude, Gemini, Grok ou um modelo local — e é possível trocar de modelo no meio do chat sem que ela deixe de funcionar. No TypingMind, você usa suas próprias chaves de API e paga diretamente aos provedores, em vez de pagar uma assinatura por licença de usuário. Suas habilidades e chats permanecem no seu próprio armazenamento.

Como instalar Playwright Qa Cli no TypingMind?

Abra Plugins → Habilidades → Instalar do GitHub no TypingMind e cole https://github.com/EricTechPro/startup-claude-skills/tree/main/skills/playwright-qa-cli. O TypingMind lê o arquivo SKILL.md, reúne os arquivos da habilidade e a instala para que possa ser ativada em cada chat.

Quais modelos de IA podem usar Playwright Qa Cli?

Qualquer modelo conectado no TypingMind. As habilidades de IA são instruções em Markdown simples, e não código específico de um provedor. Assim, GPT, Claude, Gemini, Grok e modelos locais podem carregar esta habilidade quando uma solicitação corresponder a ela.

Quantos modelos de IA posso usar com Playwright Qa Cli?

Quantos quiser. Desde que o modelo ofereça suporte a habilidades, é possível usar Playwright Qa Cli com ele — GPT, Claude, Gemini, Grok, DeepSeek, Mistral, Llama e outros — tudo no TypingMind com suas próprias chaves de API.

A habilidade de IA Playwright Qa Cli é gratuita?

Sim. A habilidade é publicada no GitHub por EricTechPro sob a licença MIT. O pagamento é feito apenas ao seu provedor de IA pelos tokens usados.

O que são habilidades de IA?

Uma habilidade de IA é um conjunto reutilizável de instruções que ensina um modelo de IA a realizar uma tarefa específica. Ela segue o formato aberto Agent Skills: um arquivo SKILL.md com nome e descrição, além de scripts, templates ou arquivos de referência de que o modelo possa precisar. O modelo lê as instruções apenas quando sua solicitação corresponde à habilidade, então uma habilidade instalada não gera custos até ser usada.

Qual é a diferença entre habilidades de IA e plugins ou servidores MCP?

Um plugin ou servidor MCP oferece ao modelo novas ferramentas que ele pode acionar — código que é executado em algum lugar e retorna um resultado. Já uma habilidade de IA dá ao modelo o conhecimento e as orientações de que ele precisa: como abordar uma tarefa, quais etapas seguir e como deve ser um bom resultado. As habilidades são escritas em Markdown simples, por isso não precisam de servidor, chave de API nem ambiente de execução, e funcionam com qualquer modelo.

Ver lista completa

Crie seu próprio espaço de trabalho com IA agora

Inscreva-se na nossa newsletter para receber avisos sobre novos recursos e futuros sorteios 👇