PHPackages                             codeception/module-playwright - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. codeception/module-playwright

ActiveLibrary

codeception/module-playwright
=============================

Playwright module for Codeception

0.2.0(1y ago)105.5k↓26.2%4[1 issues](https://github.com/Codeception/module-playwright/issues)[2 PRs](https://github.com/Codeception/module-playwright/pulls)MITPHP

Since Sep 18Pushed 1y ago1 watchersCompare

[ Source](https://github.com/Codeception/module-playwright)[ Packagist](https://packagist.org/packages/codeception/module-playwright)[ RSS](/packages/codeception-module-playwright/feed)WikiDiscussions main Synced 1mo ago

READMEChangelogDependencies (2)Versions (5)Used By (0)

Playwright module for Codeception
=================================

[](#playwright-module-for-codeception)

🚀 This is the **first and the only module that allows [Playwright](https://playwright.dev) testing in PHP**. Playwright allows testing in Chrome, Firefox, Webkit (safari). It is faster and more reliable alternative to Selenium WebDriver. Finally it is available in PHP!

This module does not implement Playwright API in PHP, rather proxies requests to Playwright helper of [CodeceptJS](https://codecept.io). This is possible because Codeception and CodeceptJS share the same architecture principles, and the interface for web testing is quite the same.

Note

This module can be used as a replacement for WebDriver module. Comparing to WebDriver module, Playwright module can **speed up your tests x3 times**, run in headless mode, record videos, and stack traces out of the box

Requirements
------------

[](#requirements)

- PHP 8.1+
- NodeJS 20+

Installation
------------

[](#installation)

Warning

This module is experimental. It is in early development stage. Please report any issues you find.

Install NodeJS part of this module, it will install Playwright and CodeceptJS

```
npm install codeception-module-playwright

```

Install Playwright browsers

```
npx playwright install --with-deps

```

Install PHP part of this module

```
composer require codeception/module-playwright --dev
```

Configuration
-------------

[](#configuration)

Enable module in `codeception.yml`:

```
modules:
    enabled:
        - Playwright:
            url: 'http://localhost'
            browser: 'chromium'
            show: true
```

Most common config values are:

- `url` - base url to open pages from
- `browser` - either `chromium`, `firefox`, `webkit`
- `show` - (default: `true`) to show browser or set to `false` to run tests in headless mode
- `timeout` - (default: `5000`) timeout (in ms) for all Playwright operations
- `pw_server` - (default: '') url of Playwright Server
- `pw_debug` - (default: `false`) print Playwright Server debug information
- `video` - save video on fail
- `trace` - save traces on fail

More configuration options are is listed on [CodeceptJS Playwright page](https://codecept.io/helpers/Playwright/#configuration)

Tip

This module is designed as drop-in WebDriver module replacement, you can change `WebDriver` to `Playwright` in your tests and try how it works!

Usage
-----

[](#usage)

Playwright module requires NodeJS server to be running. Start the server manually:

```
npx codeception-playwright-module

```

If you want to start server automatically, use [RunProcess extension](https://codeception.com/extensions#RunProcess) from Codeception

```
extensions:
    enabled:
        - Codeception\Extension\RunProcess:
            0: npx codeception-playwright-module
            sleep: 3 # wait 5 seconds for processes to boot
```

If you start server on different host or port, run port with `--port` option:

```
npx codeception-playwright-module --port 9999

```

And pass port to config

```
modules:
    enabled:
        - Playwright:
            url: 'http://localhost'
            browser: 'chromium'
            show: true
            pw_server: http://localhost:9999
```

API
---

[](#api)

This module provides the same API as WebDriver module. You can try to use it in your tests without any changes.

For the full command list see [WebDriver module reference](https://codeception.com/docs/modules/WebDriver#dontSeeElement).

Playwright-specific commands are also available in [CodeceptJS Playwright Helper](https://codecept.io/helpers/Playwright/)

Example
-------

[](#example)

```
$I->amOnPage('/');
$I->click('#first .clickable');
$I->dontSeeInTitle('Error');
$I->fillField('Username', 'John');
$I->fillField('Password', '1233456');
$I->see('Hello, world!');
```

License MIT
-----------

[](#license-mit)

###  Health Score

30

—

LowBetter than 64% of packages

Maintenance35

Infrequent updates — may be unmaintained

Popularity33

Limited adoption so far

Community13

Small or concentrated contributor base

Maturity32

Early-stage or recently created project

 Bus Factor1

Top contributor holds 93.3% of commits — single point of failure

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

###  Release Activity

Cadence

Every ~17 days

Total

3

Last Release

574d ago

### Community

Maintainers

![](https://avatars.githubusercontent.com/u/97648?v=4)[davert](/maintainers/davert)[@davert](https://github.com/davert)

---

Top Contributors

[![DavertMik](https://avatars.githubusercontent.com/u/220264?v=4)](https://github.com/DavertMik "DavertMik (28 commits)")[![eXorus](https://avatars.githubusercontent.com/u/1255561?v=4)](https://github.com/eXorus "eXorus (1 commits)")[![ThomasLandauer](https://avatars.githubusercontent.com/u/1054469?v=4)](https://github.com/ThomasLandauer "ThomasLandauer (1 commits)")

### Embed Badge

![Health badge](/badges/codeception-module-playwright/health.svg)

```
[![Health](https://phpackages.com/badges/codeception-module-playwright/health.svg)](https://phpackages.com/packages/codeception-module-playwright)
```

###  Alternatives

[magento/magento2-functional-testing-framework

Magento2 Functional Testing Framework

15511.5M30](/packages/magento-magento2-functional-testing-framework)[spatie/laravel-health

Monitor the health of a Laravel application

86910.0M83](/packages/spatie-laravel-health)[illuminate/console

The Illuminate Console package.

12944.1M5.1k](/packages/illuminate-console)[temporal/sdk

Temporal SDK

4002.2M18](/packages/temporal-sdk)[pressbooks/pressbooks

Pressbooks is an open source book publishing tool built on a WordPress multisite platform. Pressbooks outputs books in multiple formats, including PDF, EPUB, web, and a variety of XML flavours, using a theming/templating system, driven by CSS.

44643.1k1](/packages/pressbooks-pressbooks)[illuminate/process

The Illuminate Process package.

44699.5k65](/packages/illuminate-process)

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
