agentsclimarketplace

Playwright

Skill ulpi-io/plugin-marketplace/plugins/davila7/skills/playwright

A curated collection of 7,800+ agent skills for Claude Desktop, sourced from skills.sh

Install
npx -y skills add ulpi-io/plugin-marketplace --skill playwright

Assembled from the repository path, not quoted from the project. Check it against their README if it does not work.

2 things to look at

  • no licenseNo license file was found in the repository. Code published without one is not open source by default, so using it at work is a question for whoever answers licensing questions where you are.
  • 1 stars1 stars. Stars are a popularity signal and not a quality one, but at this level it is likely that nobody has read this closely except its author, and you would be relying on your own review.

What its author says it does

Copied from the file, not written here

Playwright browser automation API, web scraping, and tooling. Covers locator strategies, assertions, API testing, stealth mode, anti-bot bypass, authenticated sessions, screenshots/PDFs, Docker deployment, configuration, debugging, and MCP integration with AI agents. Prevents documented errors including CI timeout hangs, extension testing failures, and navigation issues. Use when automating browsers, scraping protected sites, bypassing bot detection, generating screenshots/PDFs, configuring Playwright Test, troubleshooting Playwright errors, or learning Playwright API patterns. For E2E test architecture, Page Object Models, CI sharding strategies, or test organization patterns, use the e2e-testing skill instead.

The file declares its own license as MIT. That is the author’s claim about this one file, and it is not the same thing as the license GitHub reports for the repository, which is listed with the other numbers below.

SKILL.md

9.7 KB, ~1.7k tokens by cl100k_base, as published. Nobody here has run it

Playwright

Overview

Playwright is a browser automation framework for Node.js and Python supporting Chromium, Firefox, and WebKit with a single API. It provides auto-waiting, web-first assertions, and full test isolation for reliable end-to-end testing.

When to use: Browser automation, web scraping, screenshot/PDF generation, API testing, configuring Playwright Test, troubleshooting Playwright errors, stealth mode and anti-bot bypass.

When NOT to use: Simple HTTP requests (use fetch), unit testing (use Vitest/Jest), serverless scraping at scale (consider Cloudflare Browser Rendering). For E2E test architecture (Page Object Models, CI sharding, test organization, authentication patterns), use the e2e-testing skill.

Quick Reference

PatternAPI / ConfigKey Points
Basic testtest('name', async ({ page }) => {})Auto-wait, web-first assertions, test isolation
Locatorpage.getByRole() / page.locator()Prefer role/label/text selectors over CSS
Assertionexpect(locator).toBeVisible()Auto-retrying, configurable timeout
API testingrequest fixture / apiRequestContextSend HTTP requests, validate responses
Aria snapshotexpect(locator).toMatchAriaSnapshot()Validate accessibility tree structure via YAML
Class assertionexpect(locator).toContainClass('active')Match individual CSS class names (v1.52+)
Visible filterlocator.filter({ visible: true })Match only visible elements (v1.51+)
Test steptest.step('name', async (step) => {})Timeout, skip, and attachments (v1.50+)
Stealth modeplaywright-extra + stealth pluginPatches 20+ detection vectors
Authenticated sessioncontext.cookies() + addCookies()Save/restore cookies and IndexedDB for persistence
Screenshotpage.screenshot({ fullPage: true })Wait for key elements to load first
PDF generationpage.pdf({ format: 'A4' })Chromium only, set printBackground: true
Clock APIpage.clockFreeze, fast-forward, or simulate time in tests
A11y assertionstoHaveAccessibleName, toHaveRoleNative assertions without axe-core dependency
Viewport assertionexpect(locator).toBeInViewport()Assert element is within the visible viewport
Changed tests only--only-changed=$GITHUB_BASE_REFRun only test files changed since base branch
Dockermcr.microsoft.com/playwright:v1.58.2-nobleUse --init --ipc=host flags
Debug methodspage.consoleMessages() / page.requests() (v1.56+)No event listeners needed
SpeedboardHTML reporter (v1.57+)Identifies slow tests and bottlenecks
Playwright Agentsnpx playwright init-agentsPlanner, generator, healer for LLM-driven testing
Flaky test detection--fail-on-flaky-tests (v1.50+)Exit code 1 on flaky tests in CI
Modify live responsesroute.fetch() + route.fulfill()Intercept real response, tweak JSON, return it
Soft assertionsexpect.soft(locator)Don't stop test on failure, report all at end
Retry blockexpect(async () => {}).toPass()Default timeout is 0 (forever) — always set one
Custom matchersexpect.extend() / mergeExpects()Define or combine custom assertion methods
Actionability matrixPer-action auto-wait checksclick: all 5 checks, fill: 3, focus/blur: none
Test modifierstest.fixme() / test.fail() / test.slow()fixme=skip+track, fail=assert failure, slow=3x
Parallel modestest.describe.configure({ mode: 'serial' })serial, parallel, or default per-describe block
Teardown projectsteardown option on setup projectsAuto-cleanup after all dependents finish

Common Mistakes

MistakeCorrect Pattern
Using CSS selectors over role selectorsPrefer getByRole, getByLabel, getByText for resilience
Not closing browserAlways await browser.close() in finally block
Using setTimeout for waitsUse locator auto-wait or waitForLoadState
page.pause() left in CI codeGuard with if (!process.env.CI) — hangs CI indefinitely
Clicking without waitingUse locator().click() with built-in auto-wait
Shared state between testsEach test gets fresh context via fixtures
Testing implementation detailsAssert user-visible behavior, not DOM structure
Hardcoded waits for dynamic contentWait for selector appearance or content stabilization
Missing await on assertionsAll expect() assertions return promises — must be awaited
Same user agent for all scrapingRotate user agents for high-volume scraping
Using setTimeout for time-dependent testsUse page.clock API to freeze/fast-forward time
Installing axe-core for simple a11y checksUse native toHaveAccessibleName/toHaveRole assertions
Using toPass() without explicit timeoutAlways pass { timeout: 10_000 } — default is 0 (forever)
Service worker silently blocking page.route()Set serviceWorkers: 'block' in context config when using MSW
Using fill() for autocomplete/debounce inputsUse pressSequentially() with optional delay for per-keystroke handling
storageState losing sessionStoragestorageState only saves cookies + localStorage — inject sessionStorage via addInitScript()

Delegation

  • Selector troubleshooting: Use Explore agent
  • Test pattern review: Use Task agent
  • Code review: Delegate to code-reviewer agent

For E2E test architecture, Page Object Model patterns, CI sharding strategies, authentication flows, visual regression workflows, or test organization, use the e2e-testing skill.

References

What ships with it: 15 files

100.4 KB alongside SKILL.md

Keep looking

Skills are one crate of 328,083. Ordering is by how many stacks a row turns up in, so the top of any crate is what has actually been picked rather than what has the most stars.