Playwright CLI
Use this skill when PMX Canvas work needs a real browser check instead of static inspection.
When To Use
- Verify a PMX Canvas UI flow after changing the client
- Open an embedded
mcp-appor/artifact?path=...route and confirm it renders - Click through context menus, pins, groups, snapshots, and other browser-only interactions
- Capture screenshots or accessibility snapshots while keeping terminal context small
Prerequisites
npm install -g @playwright/cli@latest
playwright-cli --version
Requires Node.js 18+.
Core Workflow
- Open the target URL with
playwright-cli open <url> - Capture a structural snapshot with
playwright-cli snapshot - Read the saved snapshot file to find element refs
- Interact with the page using
click,fill,press, orgoto - Verify with another snapshot or a screenshot
- Close the session when done
For PMX Canvas work, prefer a named session so you can keep a browser attached to the canvas while testing artifact tabs separately.
playwright-cli -s=canvas open http://localhost:4313
playwright-cli -s=canvas snapshot
playwright-cli -s=canvas screenshot
playwright-cli -s=canvas close
Commands You Will Use Most
open [url]— launch browser and optionally navigategoto <url>— move to another pagesnapshot— save page structure to diskscreenshot [ref]— capture page or element imageclick <ref>— click an element by snapshot reffill <ref> <text>— fill an input or textareapress <key>— send keyboard inputtab-new [url],tab-list,tab-select <index>— manage multiple pagesclose— close the current browser session
PMX Canvas Guidance
- Start the canvas first:
bun run src/cli/index.ts --no-open - Use this skill after
canvas_app { action: "build-artifact" }when you need browser validation - Prefer visible browser automation for UI investigation so the human can follow along
- Store screenshots and snapshots on disk, then only read back the specific files you need
Pairing With Other Skills
- Use
pmx-canvasto create, pin, connect, and inspect nodes - Use
web-artifacts-builderto scaffold richer React/shadcn artifacts - Use this skill to validate the generated artifact route and embedded canvas node in a browser