# @wordpress/e2e-test-utils-playwright

> End-To-End (E2E) test utils for WordPress.

Latest version **3.2.0** (published 2026-11-04) · GPL-2.0-or-later license · 0 weekly downloads

## Install

```sh
npm install @wordpress/e2e-test-utils-playwright
pnpm add @wordpress/e2e-test-utils-playwright
yarn add @wordpress/e2e-test-utils-playwright
bun add @wordpress/e2e-test-utils-playwright
```

## Health

**Score 70/100 (B)** — status: active.

Positive: has types; esm support; no vulnerabilities; recently updated; high maintenance score; popular repo.

Warnings: low downloads.

## Facts

| | |
|---|---|
| Version | 3.2.0 |
| Published | 2026-11-04 |
| First published | 2023-05-10 |
| Weekly downloads | 0 |
| License | GPL-2.0-or-later |
| TypeScript types | bundled |
| Module format | ESM + CommonJS |
| Node | >=22.19.0 |
| Dependencies | 5 |
| Unpacked size | 319.7 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 11778 |
| Author | The WordPress Contributors |
| Maintainers | garypendergast, adamsilverstein, gziolo, ntwb, riad, noisysocks, kadamwhite, gutenbergplugin, jorgefilipecosta, ellatrix, iandunn206, whyisjake, ockham, sirreal, nosolosw, wpisabel, ntsekouras, nerrad, desrosj, talldanwp, peterwilsoncc, ryanwelcher, mamaduka, aduth, johnbillion |
| Keywords | wordpress, gutenberg, e2e, utils, playwright |

## Links

- npm: https://www.npmjs.com/package/@wordpress/e2e-test-utils-playwright
- Repository: https://github.com/WordPress/gutenberg
- Homepage: https://github.com/WordPress/gutenberg/tree/HEAD/packages/e2e-test-utils-playwright/README.md
- Issues: https://github.com/WordPress/gutenberg/issues
- npm.io page: https://npm.io/package/@wordpress/e2e-test-utils-playwright

## Dependencies (5)

- [mime](https://npm.io/package/mime.md) ^3.0.0
- [get-port](https://npm.io/package/get-port.md) ^5.1.1
- [lighthouse](https://npm.io/package/lighthouse.md) ^13.4.1
- [web-vitals](https://npm.io/package/web-vitals.md) ^4.2.4
- [change-case](https://npm.io/package/change-case.md) ^4.1.2

## Alternatives

- [@snazzah/davey](https://npm.io/package/@snazzah/davey.md) — 1.5M weekly downloads
- [@vendure/testing](https://npm.io/package/@vendure/testing.md) — 8.3K weekly downloads
- [vue-simple-context-menu](https://npm.io/package/vue-simple-context-menu.md) — 6.6K weekly downloads
- [cypress-webpack-preprocessor-v5](https://npm.io/package/cypress-webpack-preprocessor-v5.md) — 2.1K weekly downloads
- [@backstage/plugin-catalog-backend-module-puppetdb](https://npm.io/package/@backstage/plugin-catalog-backend-module-puppetdb.md) — 1.3K weekly downloads

## Recent versions

- 3.2.0 (latest) — 2026-11-04
- 2.0.1-next.v.202609171837.0 (next) — 2026-09-17
- 1.40.1 (wp-7.0) — 2026-06-30
- 1.33.2 (wp-6.9) — 2025-11-07
- 1.19.1 (wp-6.8) — 2025-03-10
- 1.8.1 (wp-6.7) — 2024-09-19
- 1.0.1 (wp-6.6) — 2024-06-11
- 0.19.3 (wp-6.5) — 2024-05-02
- 0.10.13 (wp-6.4) — 2023-11-13
- 0.3.3 (wp-6.3) — 2023-10-12
- 3.1.0 — 2026-10-20
- 3.0.0 — 2026-10-07
- 2.1.0 — 2026-09-23
- 2.0.0 — 2026-09-10
- 1.54.2-next.v.202609031004.0 — 2026-09-03
- … 153 more at https://npm.io/package/@wordpress/e2e-test-utils-playwright/versions

## README

# E2E Test Utils

End-To-End (E2E) Playwright test utils for WordPress.

_It works properly with the minimum version of Gutenberg `9.2.0` or the minimum version of WordPress `5.6.0`._

<div class="callout callout-alert">
This package is still under active development. Documentation might not be up-to-date, and the <code>v0.x</code> version can introduce breaking changes without a detailed migration guide. Early adopters are encouraged to use a <a href="https://docs.npmjs.com/cli/v9/configuring-npm/package-lock-json">lock file</a> to prevent unexpected breakages.
</div>

## Installation

Install the module

```bash
npm install @wordpress/e2e-test-utils-playwright --save-dev
```

**Note**: This package requires Node.js version with long-term support status (check [Active LTS or Maintenance LTS releases](https://nodejs.org/en/about/previous-releases)). It is not compatible with older versions.

## API

### test

The extended Playwright's [test](https://playwright.dev/docs/api/class-test) module with the `admin`, `editor`, `pageUtils` and the `requestUtils` fixtures.

### expect

The Playwright/Jest's [expect](https://jestjs.io/docs/expect) function.

### Admin

End to end test utilities for WordPress admin's user interface.

```js
const admin = new Admin( { page, pageUtils } );
await admin.visitAdminPage( 'options-general.php' );
```

### Editor

End to end test utilities for the WordPress Block Editor.

To use these utilities, instantiate them within each test file:

```js
test.use( {
	editor: async ( { page }, use ) => {
		await use( new Editor( { page } ) );
	},
} );
```

Within a test or test utility, use the `canvas` property to select elements within the iframe canvas:

```js
await editor.canvas.locator( 'role=document[name="Paragraph block"i]' );
```

### PageUtils

Generic Playwright utilities for interacting with web pages.

```js
const pageUtils = new PageUtils( { page } );
await pageUtils.pressKeys( 'primary+a' );
```

### RequestUtils

Playwright utilities for interacting with the WordPress REST API.

Create a request utils instance.

```js
const requestUtils = await RequestUtils.setup( {
	user: {
		username: 'admin',
		password: 'password',
	},
} );
```

## Contributing to this package

This is an individual package that's part of the Gutenberg project. The project is organized as a monorepo. It's made up of multiple self-contained software packages, each with a specific purpose. The packages in this monorepo are published to [npm](https://www.npmjs.com/) and used by [WordPress](https://make.wordpress.org/core/) as well as other software projects.

To find out more about contributing to this package or Gutenberg as a whole, please read the project's main [contributor guide](https://github.com/WordPress/gutenberg/tree/HEAD/CONTRIBUTING.md).

<br /><br /><p align="center"><img src="https://s.w.org/style/images/codeispoetry.png?1" alt="Code is Poetry." /></p>

---
_Source: https://npm.io/package/@wordpress/e2e-test-utils-playwright · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
