new·The score now tells you which way it movedA brain's exam only ever grows: its own material writes questions, and so does every question a real caller asked and did not get answered. The score is a percentage over that growing set, so a brain that learned more could post a smaller number — and this week three did. One of them answered two MORE questions than the week before and showed eighteen points less. Printed as a single percentage, that reads as decline to a reader and as punishment to anyone who contributes material.all news →
mozg.beta
Sign in

Playwright · all subjects

getting-started

26 notes, read out of this brain and free to use. Each one was extracted from a source and is re-checked against its exam.

npx playwright show-report command

Run `npx playwright show-report` to open the HTML test report manually.

yarn playwright show-report command

Run `yarn playwright show-report` to open the HTML test report manually with yarn.

pnpm exec playwright show-report command

Run `pnpm exec playwright show-report` to open the HTML test report manually with pnpm.

Playwright Test framework capabilities

Playwright Test is an end-to-end test framework for modern web apps. It bundles test runner, assertions, isolation, parallelization and rich tooling. Playwright supports Chromium, WebKit and Firefox on Windows, Linux and macOS, locally or in CI, headless or headed, with native mobile emulation for Chrome (Android) and Mobile Safari.

npm init playwright@latest command

Run `npm init playwright@latest` to initialize a new project or add Playwright to an existing one. When prompted, choose TypeScript or JavaScript (default: TypeScript), tests folder name (default: tests, or e2e if tests already exists), add a GitHub Actions workflow (recommended for CI), and install Playwright browsers (default: yes). The command can be re-run later without overwriting existing tests.

yarn create playwright command

Run `yarn create playwright` to initialize a new Playwright project with yarn.

pnpm create playwright command

Run `pnpm create playwright` to initialize a new Playwright project with pnpm.

Playwright installation creates configuration and test scaffold

Playwright installation downloads required browser binaries and creates the following files and folders: playwright.config.ts (test configuration), package.json, package-lock.json (or yarn.lock / pnpm-lock.yaml), and tests/ directory containing example.spec.ts (minimal example test).

Default test execution behavior

By default, tests run headless in parallel across Chromium, Firefox and WebKit (configurable in playwright.config). Output and aggregated results display in the terminal.

npx playwright test command

Run `npx playwright test` to execute tests with npm.

yarn playwright test command

Run `yarn playwright test` to execute tests with yarn.

pnpm exec playwright test command

Run `pnpm exec playwright test` to execute tests with pnpm.

Running tests with --headed flag

Add the `--headed` flag to see the browser window when running tests. For example: `npx playwright test --headed`.

Running tests for single project or browser

Use `--project=chromium` (or other browser name) to run tests only for a specific project or browser.

Running single test file

Run `npx playwright test tests/example.spec.ts` to execute a single test file.

Opening testing UI with --ui flag

Use `--ui` flag to open the testing UI. For example: `npx playwright test --ui`.

HTML Reporter features

The HTML Reporter provides a dashboard filterable by browser, passed, failed, skipped, flaky and more. Click a test to inspect errors, attachments and steps. It auto-opens only when failures occur.

UI Mode features

UI Mode provides watch mode, live step view, time travel debugging and more. Run tests with `--ui` flag to access UI Mode.

Updating Playwright with yarn

To update Playwright and download new browser binaries and their dependencies with yarn, run: `yarn add --dev @playwright/test@latest` followed by `yarn playwright install --with-deps`.

Updating Playwright with pnpm

To update Playwright and download new browser binaries and their dependencies with pnpm, run: `pnpm install --save-dev @playwright/test@latest` followed by `pnpm exec playwright install --with-deps`.

Check installed Playwright version with yarn

Run `yarn playwright --version` to check the installed Playwright version.

Check installed Playwright version with pnpm

Run `pnpm exec playwright --version` to check the installed Playwright version.

Node.js version requirements

Node.js latest 22.x, 24.x or 26.x is required.

Windows system requirements

Windows 11+ or Windows Server 2019+ or Windows Subsystem for Linux (WSL) is required.

macOS system requirements

macOS 14 (Sonoma) or later is required.

Linux system requirements

Debian 12 / 13, Ubuntu 22.04 / 24.04 / 26.04 (x86-64 or arm64) is required.

Give your agent this brain