test-page
GitHub使用 Playwright CLI 进行页面或用户流程测试,包括导航、交互、快照和验证。适用于视觉检查、表单测试、流程验证及 UI 问题调试。
Trigger Scenarios
Install
npx skills add ryparker/excisely --skill test-page -g -y
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/validateor 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
playwright-cli open http://localhost:3001/login- Read snapshot to find email/password field refs
playwright-cli fill <email-ref> "jenny.park@ttb.gov"playwright-cli fill <password-ref> "specialist123"playwright-cli click <submit-ref>playwright-cli snapshot— verify dashboard loaded
Validate Label Flow
- Login first (see above)
playwright-cli goto http://localhost:3001/validateplaywright-cli snapshot— find form field refs- Select beverage type, upload label image, fill fields
- Click "Validate"
sleep 5 && playwright-cli snapshot— verify results with annotated image
Review Queue Flow
- Login first
playwright-cli goto http://localhost:3001/reviewplaywright-cli snapshot— verify queue table with pending items- Click first item
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 consoleto check for errors - Verify navigation works (links go to correct pages)
6. Clean Up
playwright-cli close
Test Users
| Role | 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 snapshotto 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
vercelCLI'sget_access_to_vercel_urlfirst - Use
playwright-cli consoleto check for JavaScript errors - Use
playwright-cli networkto debug failed API calls
Version History
- f4336bc Current 2026-07-25 07:29


