Agent Skillsryparker/excisely › test-page

test-page

GitHub

使用 Playwright CLI 进行页面或用户流程测试,包括导航、交互、快照和验证。适用于视觉检查、表单测试、流程验证及 UI 问题调试。

.claude/skills/test-page/SKILL.md ryparker/excisely

Trigger Scenarios

需要验证前端页面结构或内容 测试用户交互流程如登录或表单提交 调试 UI 显示或行为问题

Install

npx skills add ryparker/excisely --skill test-page -g -y
More Options

Non-standard path

npx skills add https://github.com/ryparker/excisely/tree/main/.claude/skills/test-page -g -y

Use without installing

npx skills use ryparker/excisely@test-page

指定 Agent (Claude Code)

npx skills add ryparker/excisely --skill test-page -a claude-code -g -y

安装 repo 全部 skill

npx skills add ryparker/excisely --all -g -y

预览 repo 内 skill

npx skills add ryparker/excisely --list

SKILL.md

Frontmatter
{
    "name": "test-page",
    "description": "Test a page or user flow using Playwright CLI. Navigate to a URL, interact with elements, take snapshots, and verify behavior. Use when you need to visually check a page, test a form, verify a user flow, or debug UI issues.",
    "argument-hint": "<url>"
}

Test Page

Use the playwright-cli (Bash tool) to navigate to a page, interact with it, take snapshots, and verify it works correctly.

IMPORTANT: Never use the Playwright MCP. Always use playwright-cli via the Bash tool.

Required Input

  • URL: The page URL (e.g., http://localhost:3001/validate or a Vercel deployment URL)

Instructions

1. Open the Browser and Navigate

playwright-cli open <url>

This opens a headless browser and navigates to the URL. It returns a page snapshot with element refs.

2. Take a Snapshot

playwright-cli snapshot

Read the snapshot YAML file to see the page structure and find element refs (e.g., e11, e14).

3. Interact and Verify

All interactions use element refs from the snapshot:

# Fill a form field
playwright-cli fill <ref> "<text>"

# Click a button or link
playwright-cli click <ref>

# Select from dropdown
playwright-cli select <ref> "<value>"

# Upload a file
playwright-cli upload <file-path>

# Type text into focused element
playwright-cli type "<text>"

# Navigate to a URL
playwright-cli goto <url>

# Check console for errors
playwright-cli console

After each interaction, run playwright-cli snapshot to see the updated page state and get new element refs.

4. Common Test Flows

Login Flow

  1. playwright-cli open http://localhost:3001/login
  2. Read snapshot to find email/password field refs
  3. playwright-cli fill <email-ref> "jenny.park@ttb.gov"
  4. playwright-cli fill <password-ref> "specialist123"
  5. playwright-cli click <submit-ref>
  6. playwright-cli snapshot — verify dashboard loaded

Validate Label Flow

  1. Login first (see above)
  2. playwright-cli goto http://localhost:3001/validate
  3. playwright-cli snapshot — find form field refs
  4. Select beverage type, upload label image, fill fields
  5. Click "Validate"
  6. sleep 5 && playwright-cli snapshot — verify results with annotated image

Review Queue Flow

  1. Login first
  2. playwright-cli goto http://localhost:3001/review
  3. playwright-cli snapshot — verify queue table with pending items
  4. Click first item
  5. playwright-cli snapshot — verify review detail with override controls

5. Assess Results

After taking snapshots:

  • Check the snapshot YAML for correct page structure and content
  • Verify status badges show correct text
  • Check that forms have proper labels
  • Run playwright-cli console to check for errors
  • Verify navigation works (links go to correct pages)

6. Clean Up

playwright-cli close

Test Users

Role Email Password
Admin sarah.chen@ttb.gov admin123
Specialist (senior) dave.morrison@ttb.gov specialist123
Specialist (junior) jenny.park@ttb.gov specialist123

Tips

  • After each interaction, run playwright-cli snapshot to get updated element refs
  • Element refs change after page updates — always use refs from the latest snapshot
  • If the dev server isn't running, ask the user to start it with yarn dev
  • For deployed URLs that return 403, use vercel CLI's get_access_to_vercel_url first
  • Use playwright-cli console to check for JavaScript errors
  • Use playwright-cli network to debug failed API calls

Version History

  • f4336bc Current 2026-07-25 07:29

Same Skill Collection

.claude/skills/check-deployment/SKILL.md
.claude/skills/db-inspect/SKILL.md

Metadata

Files
0
Version
f4336bc
Hash
7b09ec9c
Indexed
2026-07-25 07:29

Accueil - Wiki
Copyright © 2011-2026 iteam. Current version is 2.155.2. UTC+08:00, 2026-08-27 05:39
浙ICP备14020137号-1 $Carte des visiteurs$