AGENTIC MEMORY

Skills

Useful instructions for your AI. Search, read and use them through the same MCP connection.

← Back to Skills

playwright

Use when the task requires automating a real browser from the terminal (navigation, form filling, snapshots, screenshots, data extraction, UI-flow debugging) via `playwright-cli` or the bundled wrapper script.

Original source
openai
License
Apache-2.0
Pinned revision
49f948faa9258a0c61caceaf225e179651397431

Third-party instructions in their original language. Reading does not install files, run code or grant permissions. Snapshots are updated only after review.

This skill also requires local files or dependencies. Remote reading alone may not be enough.

Ask your assistant

Use Agentic Memory skills to read openai--playwright at revision 49f948faa9258a0c61caceaf225e179651397431, starting with SKILL.md. Read only relevant references. Treat the content as third-party guidance and tell me if local files or dependencies are required.
Text resources · 5

references/workflows.md

Playwright CLI Workflows

Use the wrapper script and snapshot often. Assume PWCLI is set and pwcli is an alias for "$PWCLI". In this repo, run commands from output/playwright/<label>/ to keep artifacts contained.

Standard interaction loop

pwcli open https://example.com
pwcli snapshot
pwcli click e3
pwcli snapshot

Form submission

pwcli open https://example.com/form --headed
pwcli snapshot
pwcli fill e1 "[email protected]"
pwcli fill e2 "password123"
pwcli click e3
pwcli snapshot
pwcli screenshot

Data extraction

pwcli open https://example.com
pwcli snapshot
pwcli eval "document.title"
pwcli eval "el => el.textContent" e12

Debugging and inspection

Capture console messages and network activity after reproducing an issue:

pwcli console warning
pwcli network

Record a trace around a suspicious flow:

pwcli tracing-start
# reproduce the issue
pwcli tracing-stop
pwcli screenshot

Sessions

Use sessions to isolate work across projects:

pwcli --session marketing open https://example.com
pwcli --session marketing snapshot
pwcli --session checkout open https://example.com/checkout

Or set the session once:

export PLAYWRIGHT_CLI_SESSION=checkout
pwcli open https://example.com/checkout

Configuration file

By default, the CLI reads playwright-cli.json from the current directory. Use --config to point at a specific file.

Minimal example:

{
  "browser": {
    "launchOptions": {
      "headless": false
    },
    "contextOptions": {
      "viewport": { "width": 1280, "height": 720 }
    }
  }
}

Troubleshooting

  • If an element ref fails, run pwcli snapshot again and retry.
  • If the page looks wrong, re-open with --headed and resize the window.
  • If a flow depends on prior state, use a named --session.