Topic

Playwright in CI

Setup, locators, fixtures, sharding, and the pipeline work that keeps a Playwright suite fast, green, and cheap to run.

Playwright 1.65 Changes How Page Object Fields Initialize

Playwright 1.65 follows useDefineForClassFields, so page object fields initialized from this.page can throw. It also adds Bun support and failures-only reports.

News

Which Test Data Isolation Strategy Fits a Shared Database?

Test data isolation: rollback, per-worker databases or Testcontainers? Three questions: same connection as the app, workers or shards, fidelity vs CI time.

Flaky tests

Playwright Test Agents: Run the Healer Without Losing CI Signal

Playwright Test Agents: run the healer on a branch a person reviews, keep the gating CI job deterministic, and sort each heal diff by cause before it merges.

Playwright

Playwright Visual Tests That Pass in CI for the Right Reasons

Fix failing Playwright visual regression checks in CI: a four-step triage with tolerance last, and CI-generated baselines approved by named code owners.

Playwright

Playwright in GitHub Actions: Docker, Failure Capture, and Worker Parallelism

Match the Playwright Docker image tag to your installed version, pick screenshot and video capture on purpose, and set CI workers instead of the local default.

Playwright

Flaky Playwright Tests: Five Root Causes and Fixes

Five root causes of flaky Playwright tests with code fixes: auto-wait limits, non-retrying assertions, brittle locators, network races, and hard sleeps.

Flaky tests

How to Run Automated Tests in GitHub Actions

Run automated tests in GitHub Actions: triggers, caching, matrix builds, sharding, and failure artifacts, with copy-ready pytest, Jest, and Playwright jobs.

Playwright

Playwright vs Cypress vs Selenium: 2026 Edition

Playwright vs Cypress vs Selenium in 2026: browser architecture, parallelism costs, AI test features, and a framework pick by team and language.

Playwright

Setting Up Playwright with TypeScript from Scratch

Set up Playwright with TypeScript step by step. Covers project creation, configuration, writing your first test, and adding GitHub Actions CI integration.

Playwright
Pillar guide

About this topic

Playwright is a browser automation library that drives Chromium, Firefox, and WebKit through a single API. What separates it from the previous generation of end-to-end tools is not the API surface, it is two defaults: auto-waiting locators and web-first assertions that retry until a timeout. Together they remove the most common source of hand-written flakiness, which is a test that asserted before the page was ready.

That does not make a Playwright suite automatically reliable. It moves the failure modes somewhere else, into locator strategy, fixture scope, worker isolation, and CI configuration. This topic covers the work that keeps a suite fast and trustworthy after the first fifty tests, when the defaults stop carrying the whole load.

Testland's position: the framework choice matters far less than the suite architecture built on top of it. A disciplined Selenium suite beats an undisciplined Playwright suite, and most migration projects that expected a reliability win from the tool alone got a rewrite of the same problems in new syntax.

Getting a project to first green

A new Playwright project needs four decisions before the first test: TypeScript or JavaScript, which browser projects to run, where the base URL comes from, and how authentication state is established. Getting authentication right early is the one that saves the most time later, because a suite that logs in through the UI on every test spends most of its runtime on a code path it is not testing.

Setting up Playwright with TypeScript from scratch walks the project creation, config, first test, and CI wiring end to end.

Locators are the durability decision

Selector strategy determines how much maintenance a suite costs over its life. CSS class chains and nth-child positions break on every refactor. Role-based and label-based locators break when the accessible name changes, which is a meaningful change worth breaking on.

Playwright's getByRole, getByLabel, and getByTestId exist in that priority order for a reason: the first two assert something a user can perceive, and the third is an explicit contract between the test and the markup. Reaching for raw CSS is the point where a suite starts accumulating the maintenance debt that eventually gets it deleted.

Speed is a reliability feature

A 4 hour suite and a 30 minute suite are not the same suite at different speeds, they are different products. Engineers route around the slow one, merge without waiting, and discover failures after the fact. Fast feedback is what makes the suite part of the development loop rather than an audit that happens later.

Sharding across CI machines, running browser projects in parallel, caching package dependencies, and reusing authentication state are the four levers that matter most, and they interact: sharding multiplies the cost of a slow global setup across every shard. Browser binaries are the exception to caching: Playwright's CI docs say caching them "is not recommended, since the amount of time it takes to restore the cache is comparable to the time it takes to download the binaries." How to run automated tests in GitHub Actions covers triggers, dependency caching, the browser matrix, sharding, and artifact upload with a copy-ready Playwright job, and Playwright in GitHub Actions: Docker, failure capture, and worker parallelism covers the tuning that goes on top of it.

When the flakiness is yours, not the framework's

Auto-waiting handles element readiness. It does not handle a test that depends on data another test created, a worker that shares a database row, a fixture scoped too broadly, or an assertion on a value the application legitimately renders twice.

Flaky Playwright tests: five root causes and fixes covers the failure modes specific to this framework, including the limits of auto-wait and the non-retrying assertion forms that quietly reintroduce races. The general diagnosis and quarantine machinery lives under flaky tests.

Choosing between frameworks

Playwright is not the correct answer for every team. Cypress has a debugging experience that some teams weigh above cross-browser coverage, and Selenium remains the only option for stacks locked to its language bindings or an existing grid investment.

Playwright vs Cypress vs Selenium: 2026 edition compares browser architecture, parallelism costs, and AI-assisted test features, and lands on a recommendation by team shape and language rather than declaring a single winner.

Skills and agents for Playwright suites

qa-web-e2e packages the framework wrappers as installable Claude Code skills, including playwright-testing for authoring and flakiness remediation. For a project with no browser tests yet, or one choosing between frameworks, web-e2e-overview reads the files already in the repo and walks a decision table across Playwright, Cypress, Selenium WebDriver, and WebdriverIO before getting a first test to green.

Two agents handle the work around the tests themselves. automation-harness-bootstrapper scaffolds the harness for a repo that has none: the folder layout, base fixtures, a page-object base class, one smoke test, and the CI job that runs it. playwright-codegen-reviewer refactors raw codegen output into page objects with accessibility-first locators and arrange-act-assert structure, so recorded flows don't land in the suite as brittle CSS chains.

CI wiring lives in qa-ci-integration, including GitHub Actions test jobs and the conventions that keep sharded runs reportable. The ci-pipeline-health-critic agent reviews an existing workflow for missing concurrency cancellation, retries that mask flakiness, and absent report uploads. How these install and get invoked in Claude Code is covered under Claude Code for QA.

What this topic does not cover

Component testing, visual regression, and accessibility assertions can all be driven from Playwright, but they are separate disciplines with their own baselines and gates. Mobile app automation is out of scope entirely: Playwright drives mobile browsers, not native applications.