playwright-extension-testing

Playwright Extension Testing Expert

Safety Notice

This listing is imported from skills.sh public index metadata. Review upstream SKILL.md and repository scripts before running.

Copy this and send it to your AI assistant to learn

Install skill "playwright-extension-testing" with this command: npx skills add zenstudiolab/skills/zenstudiolab-skills-playwright-extension-testing

Playwright Extension Testing Expert

This skill provides a "gold standard" for browser extension E2E testing, specifically optimized for MV3 and frameworks like WXT. Extensions require unique handling for persistent browser contexts, non-headless modes, and onboarding flows.

Core Mandates

  • Non-Headless is Mandatory: Browser extensions do NOT load properly in standard headless mode. Use headless: false .

  • Persistent Context: Extensions require launchPersistentContext to maintain state and load correctly.

  • XVFB for Linux/CI: Always prefix test commands with xvfb-run -a on Linux/CI to provide a virtual display for the non-headless browser.

  • Data-TestId First: Prohibit text-based locators. Always add data-testid to source code if missing.

  • Dismiss Onboarding: Every test must dismiss welcome banners/onboarding dialogs before interacting with the UI.

  • Complementary Usage: This skill is highly specialized for extensions. For general Playwright best practices (locators, assertions, reporting), you MUST check if playwright-expert or playwright-skill is available and use them in tandem.

Available Boilerplate (Assets)

This skill provides pre-configured boilerplate to jumpstart a project. See the assets/boilerplate/ directory.

  • extension-helper.ts : A robust Playwright fixture setup including extensionId discovery and onboarding dismissal.

  • playwright.config.ts : The recommended configuration for extension testing.

Workflow: Setting Up a New Project

  • Identify Project Structure: Determine where the built extension output is located (e.g., .output/chrome-mv3 ).

  • Inject Boilerplate: Use the read_file tool to extract the boilerplate from this skill's assets/ and write them to the target project's tests/e2e/ directory.

  • Verify Build Step: Remind the user that extensions must be built BEFORE running E2E tests (yarn build ).

  • Run First Test: Use xvfb-run -a playwright test to verify the setup.

Best Practices

The "Dismissal" Loop

Always use the dismissWelcomeBanner helper provided in the boilerplate. Extensions often have multiple layers of onboarding (e.g., "Grant Access", "Get Started").

Storage Management

The boilerplate's extensionId fixture automatically clears chrome.storage.local and chrome.storage.sync before each test. Ensure tests don't assume state exists unless they create it.

Waiting for UI Settle

Extensions can be slower to load than standard web pages. Use a 3000ms settle time after navigation or dismissal.

Source Transparency

This detail page is rendered from real SKILL.md content. Trust labels are metadata-based hints, not a safety guarantee.

Related Skills

Related by shared tags or category signals.

General

OpenClaw Skill Growth

Make OpenClaw Skills observable, diagnosable, and safely improvable over time. Use this when the user wants to maintain many SKILL.md files, inspect repeated...

Registry SourceRecently Updated
00Profile unavailable
General

Find Skills for ClawHub

Search for and discover OpenClaw skills from ClawHub (the official skill registry). Activate when user asks about finding skills, installing skills, or wants...

Registry SourceRecently Updated
2781Profile unavailable
General

Skill Listing Polisher

Improve a skill's public listing before publish. Use when tightening title, description, tags, changelog, and scan-friendly packaging so the listing looks cl...

Registry SourceRecently Updated
1130Profile unavailable
General

Skill Priority Setup

Scans installed skills, suggests L0-L3 priority tiers, and auto-configures skill injection policy. Use when: setting up skill priorities, optimizing token bu...

Registry SourceRecently Updated
2510Profile unavailable