Playwright

A modern browser automation framework built for reliable end-to-end tests.

CurrentintermediateFull course available

Overview

Playwright automates Chromium, Firefox, and WebKit with a modern API designed to avoid the flakiness common in older browser-testing tools -- built-in auto-waiting, network interception, and reliable selectors. This platform's own end-to-end test suite is built entirely on Playwright.

What it is
A browser automation framework for reliable, cross-browser end-to-end testing.
Why it's used
Its auto-waiting and modern API reduce the flaky, intermittently-failing tests common with older tools.
Where it fits
An alternative to Selenium; this platform's own test suite (tests/e2e/) is a real, inspectable Playwright example, including accessibility sweeps via @axe-core/playwright. The Playwright Web Automation course covers this in depth: locators, auto-waiting, fixtures, authentication state, network mocking, parallel execution, and trace-based diagnostics.

Core concepts

  • Locators and auto-waiting
  • Assertions (expect)
  • Fixtures and test isolation
  • Running across multiple browsers

Example

This is genuinely close to how this platform's own tests/e2e/navigation.spec.ts file is written -- Playwright's getByRole locator matches accessible roles, encouraging accessible markup as a side effect of testable markup.

test("homepage loads", async ({ page }) => {
  await page.goto("/");
  await expect(page.getByRole("heading", { level: 1 })).toBeVisible();
});

Common use cases

  • Automated end-to-end testing
  • Cross-browser testing
  • Automated accessibility sweeps

Project ideas

  • Write a Playwright test that navigates a simple site and asserts a heading is visible

Official references