playwright-setup

Verifies Playwright installation and troubleshoots browser automation setup errors across platforms and CI pipelines.

Updated Mar 30, 2026
One-click install
npx skills add https://github.com/rubrical-works/idpf-praxis-skills --skill playwright-setup-rubrical-works
Or copy as Structured Prompt for Agent▼
Please help me install this Agent Skill.
Skill: playwright-setup
Source: https://github.com/rubrical-works/idpf-praxis-skills/tree/main/Skills/playwright-setup
Command: npx skills add https://github.com/rubrical-works/idpf-praxis-skills --skill playwright-setup-rubrical-works

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill requires @playwright/test, and includes references (resource) components.

What problem does it solve? Setting up Playwright involves three separate steps (package install, browser download, system dependencies), and missing any one causes cryptic errors like "Executable doesn't exist" or tests that pass locally but fail in CI. This Skill guides verification, diagnosis, and repair of Playwright installations. ## Core Features & Use Cases - Installation Verification: Runs the three-step install checklist (package, browsers, system deps) and validates each stage with commands like npm ls @playwright/test and npx playwright install --dry-run. - Error Diagnosis: Maps common error messages (missing executables, missing Linux libraries, launch timeouts, race conditions) to concrete fixes, with a detailed error reference in resources/common-errors.md. - CI Configuration: Provides ready-to-adapt pipeline patterns for GitHub Actions, GitLab CI, Jenkins, CircleCI, and Azure DevOps, including browser caching and test sharding. - Use Case: A developer's tests pass locally but fail in GitHub Actions with "Executable doesn't exist". Invoke this Skill to identify the missing npx playwright install --with-deps step and get a corrected workflow file. ## Quick Start Ask the assistant to verify my Playwright installation and diagnose why browser tests fail in CI.

Frequently Asked Questions about playwright-setup

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I fix the Playwright "Executable doesn't exist" error?▼

This error means browser binaries were never downloaded after installing the npm package. Run `npx playwright install` to download Chromium, Firefox, and WebKit (~500MB), or `npx playwright install chromium` for a single browser.

How do I set up Playwright in GitHub Actions CI?▼

Add a step running `npx playwright install --with-deps` after `npm ci`, which downloads browsers and installs Linux system libraries in one command. Upload the `playwright-report/` directory as an artifact with `if: always()` so reports persist on test failure.

Why do Playwright tests pass locally but fail in CI?▼

Common causes are missing browser binaries in CI, version mismatches, timing differences, and absent display servers on Linux. Pin the Playwright version, add `npx playwright install` to the pipeline, use headless mode, and add explicit waits for flaky selectors.

Does Playwright on Linux require extra system dependencies?▼

Yes, Linux requires shared libraries such as libatk that browsers link against. Install them with `npx playwright install-deps` (requires sudo), or use the official `mcr.microsoft.com/playwright` Docker image which bundles everything.

How do I run Playwright tests in headed mode for debugging?▼

Launch the browser with `chromium.launch({ headless: false })`, optionally adding `slowMo: 100` to slow interactions. Headed mode requires a display server, so in CI use headless mode or wrap commands with `xvfb-run`.