playwright-core

Provides Playwright testing patterns for E2E, API, visual, and accessibility testing in TypeScript and JavaScript.

Updated Aug 11, 2026
One-click install
npx skills add https://github.com/t-jet/pal_found_cli --skill playwright-core-t-jet
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: playwright-core
Source: https://github.com/t-jet/pal_found_cli/tree/main/.ept/skills/playwright/core
Command: npx skills add https://github.com/t-jet/pal_found_cli --skill playwright-core-t-jet

SYSTEM DOCUMENTATION & REQUIREMENTS

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

What problem does it solve? Writing reliable Playwright tests requires knowing which locators, assertions, fixtures, and mocking strategies to use, and mistakes like hardcoded waits or shared state cause flaky suites. This Skill supplies opinionated, production-tested guidance across the full Playwright testing surface so tests are stable and maintainable. ## Core Features & Use Cases - 46 reference guides: Cover locators, web-first assertions, fixtures, network mocking, authentication, visual regression, accessibility (axe-core), API testing (REST and GraphQL), debugging, and flaky test diagnosis. - Framework recipes: Dedicated setup and testing patterns for Next.js, React, Vue/Nuxt, and Angular, including Angular Material components, reactive forms, and router navigation. - Specialized topics: WebSockets, iframes, Shadow DOM, service workers, Electron, browser extensions, security testing, performance, and i18n. - Use Case: When asked to write an E2E test for a login flow in a Next.js app, the Skill directs you to role-based locators, storageState auth reuse, and web-first assertions instead of brittle CSS selectors and waitForTimeout calls. ## Quick Start Ask the agent to write a Playwright E2E test for your app's login flow using role-based locators and web-first assertions.

Frequently Asked Questions about playwright-core

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

FAQPage Schema
How do I write reliable Playwright tests that don't flake?

Use role-based locators like getByRole instead of CSS or XPath selectors, rely on web-first assertions such as expect(locator).toBeVisible() that auto-retry, and never use page.waitForTimeout(). Isolate every test with no shared state and set retries to 2 in CI and 0 locally.

How to mock API requests in Playwright tests?

Use page.route() to intercept network requests and fulfill them with custom responses. Mock only external third-party services like payment gateways or email providers, never your own application's API, so tests exercise real application behavior.

Does Playwright support accessibility testing with axe-core?

Yes, the @axe-core/playwright package integrates axe-core scans into Playwright tests via AxeBuilder. You can run full-page scans, scope scans to specific regions, filter by WCAG tags like wcag2aa, and disable rules for tracked known issues.

Can I use Playwright for API testing without a browser?

Yes, the built-in request fixture provides an APIRequestContext that makes HTTP calls without launching a browser. It supports REST and GraphQL endpoints, custom headers, authentication tokens, and can be configured with a dedicated project in playwright.config.

Why are my Playwright tests flaky in CI?

Flakiness usually comes from hardcoded waits, non-retrying assertions on resolved values, shared state between tests, or race conditions with animations. Replace waitForTimeout with web-first assertions, isolate test data, and use traces set to on-first-retry to diagnose failures.

How do I handle authentication in Playwright tests?

Perform login once in a setup project and save the session with storageState, then reuse that state across tests to skip repeated logins. For API-seeded scenarios, create users via the request fixture and clean them up after each test.