All skills
fugazi avatar

/playwright-cli

@f84a7be

Drive a live browser from the CLI with playwright-cli to navigate, interact, snapshot, and capture evidence. Use for ad-hoc browser commands, page inspection, screenshots, traces, network mocking, session management, or interactive debugging—not authoring @playwright/test specs. Keywords: playwright-cli, browser automation, live session, snapshot, console, tracing.

Use this Skill: https://skilld.dev/gh/fugazi/test-automation-skills-agents/playwright-cli

This session only. Nothing lands on disk.

referencesplaywright-tests.md

≈454 tokens on demand. Your agent reads this file only when SKILL.md points to it.

Running Playwright Tests

Part of the playwright-cli skill. See SKILL.md for full context.

To run Playwright tests, use the npx playwright test command, or a package manager script. To avoid opening the interactive html report, use PLAYWRIGHT_HTML_OPEN=never environment variable.

# Run all tests
PLAYWRIGHT_HTML_OPEN=never npx playwright test

# Run all tests through a custom npm script
PLAYWRIGHT_HTML_OPEN=never npm run special-test-command

Debugging Playwright Tests

To debug a failing Playwright test, run it with --debug=cli option. This command will pause the test at the start and print the debugging instructions.

IMPORTANT: run the command in the background and check the output until "Debugging Instructions" is printed. Make sure to stop the command after you have finished.

Once instructions containing a session name are printed, use playwright-cli to attach the session and explore the page.

# Run the test
PLAYWRIGHT_HTML_OPEN=never npx playwright test --debug=cli
# ...
# ... debugging instructions for "tw-abcdef" session ...
# ...

# Attach to the test
playwright-cli attach tw-abcdef

Keep the test running in the background while you explore and look for a fix. The test is paused at the start, so you should step over or pause at a particular location where the problem is most likely to be.

Every action you perform with playwright-cli generates corresponding Playwright TypeScript code. This code appears in the output and can be copied directly into the test. Most of the time, a specific locator or an expectation should be updated, but it could also be a bug in the app. Use your judgement.

After fixing the test, stop the background test run. Rerun to check that test passes.

Source: SKILL.md on GitHub

1 warning5d3 checks · Risk SAFE
  • Gen Agent Trust Hub5d

    The playwright-cli skill provides powerful browser automation capabilities, including arbitrary JavaScript execution, network interception, and browser state management. While these tools are essential for the skill's purpose, they create a vulnerability surface for indirect prompt injection if the agent navigates to untrusted websites. The skill also facilitates capturing sensitive browser data such as cookies and session tokens to local files.

  • Socket5d

    No alerts

  • Snyk5d

    Risk: MEDIUM · 1 issue

Signed by skilld at f84a7be. This ties the file your Agent reads to that commit on GitHub. It does not review the instructions.

Last checked against GitHub 4 days ago.

Activeupdated 5 days ago

README badge

README badge for fugazi/test-automation-skills-agents/playwright-cli