PHPackages                             gawrys/dawn - 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. [Testing &amp; Quality](/categories/testing)
4. /
5. gawrys/dawn

ActiveLibrary[Testing &amp; Quality](/categories/testing)

gawrys/dawn
===========

Run existing Laravel Dusk test suites on Playwright - a drop-in reimplementation of Dusk's Browser API, no test rewrites.

v0.3.1(2d ago)23↓100%MITPHPPHP ^8.2CI passing

Since Jul 5Pushed 2d ago1 watchersCompare

[ Source](https://github.com/igorgawrys1/dawn)[ Packagist](https://packagist.org/packages/gawrys/dawn)[ Docs](https://igorgawrys1.github.io/dawn-docs/)[ RSS](/packages/gawrys-dawn/feed)WikiDiscussions main Synced today

READMEChangelog (4)Dependencies (8)Versions (5)Used By (0)

🌅 Dawn
======

[](#-dawn)

### Run your existing Laravel Dusk suite on Playwright - without rewriting a single test.

[](#run-your-existing-laravel-dusk-suite-on-playwright---without-rewriting-a-single-test)

[![Latest Version](https://camo.githubusercontent.com/2e057edf1dbeebde5c86bee94f84f84305543e30d05a2c87d88a66aeef024e66/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f762f6761777279732f6461776e2e7376673f6c6162656c3d7061636b6167697374267374796c653d666c61742d737175617265)](https://packagist.org/packages/gawrys/dawn)[![Total Downloads](https://camo.githubusercontent.com/28a4003e3f8a917e778cfa2a57559748bd2dd306f6de05eb7c676b39daeeae9b/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f64742f6761777279732f6461776e2e7376673f7374796c653d666c61742d737175617265)](https://packagist.org/packages/gawrys/dawn)[![CI](https://camo.githubusercontent.com/688452072466fc33270ac833243c7c16423e87015e8648560cd5f7a691e24229/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f616374696f6e732f776f726b666c6f772f7374617475732f69676f72676177727973312f6461776e2f63692e796d6c3f6272616e63683d6d61696e266c6162656c3d4349267374796c653d666c61742d737175617265)](https://github.com/igorgawrys1/dawn/actions/workflows/ci.yml)
[![PHP Version](https://camo.githubusercontent.com/e90f21a445d8f2089568a89b58871dc884643ef5a3625f23d4ce4fa4a9123321/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f7068702d762f6761777279732f6461776e2e7376673f7374796c653d666c61742d737175617265)](https://packagist.org/packages/gawrys/dawn)[![Laravel](https://camo.githubusercontent.com/2d1b11213a716151a54cbdd6c6de3bf1dcfcb702e758d2d1d510422eb3ca0c82/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f4c61726176656c2d31302532302537432532303131253230253743253230313225323025374325323031332d4646324432303f6c6f676f3d6c61726176656c267374796c653d666c61742d737175617265)](https://laravel.com)[![PHPStan](https://camo.githubusercontent.com/ffd7c903f304e2cde7af10282411f2684ee22178da35b2ba7b6bff4dc802aec9/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f5048505374616e2d6d61782d627269676874677265656e3f7374796c653d666c61742d737175617265)](phpstan.neon.dist)[![Dusk compatibility](https://camo.githubusercontent.com/799bea19932e1a277a8e6f907be4bda3f6b15cc6a99f9d57dcbe80a7c316bc7d/68747470733a2f2f696d672e736869656c64732e696f2f656e64706f696e743f75726c3d68747470733a2f2f7261772e67697468756275736572636f6e74656e742e636f6d2f69676f72676177727973312f6461776e2f6d61696e2f2e6769746875622f6261646765732f6475736b2d636f6d7061742e6a736f6e267374796c653d666c61742d737175617265)](COMPATIBILITY.md)[![License: MIT](https://camo.githubusercontent.com/942e017bf0672002dd32a857c95d66f28c5900ab541838c6c664442516309c8a/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f6c6963656e73652d4d49542d626c75652e7376673f7374796c653d666c61742d737175617265)](LICENSE)

**[Documentation](https://igorgawrys1.github.io/dawn-docs/)** · **[Migration guide](https://igorgawrys1.github.io/dawn-docs/guide/migration)** · **[Why it's a game-changer](https://igorgawrys1.github.io/dawn-docs/guide/why-a-game-changer)** · **[Compatibility](COMPATIBILITY.md)** · **[Changelog](CHANGELOG.md)**

---

Note

**Dawn does not swap Dusk's WebDriver driver; it reimplements Dusk's public Browser API on Playwright.**

Your test bodies stay exactly as they are - `visit`, `type`, `press`, `waitFor`, `assertSee`, `within`, `loginAs`, `@dusk` selectors, all of it - while the browser underneath is driven by Playwright: native auto-waiting, no ChromeDriver binary to manage, no Selenium.

```
$this->browse(function (Browser $browser) {
    $browser->visit('/login')
        ->type('email', 'taylor@laravel.com')
        ->type('password', 'secret')
        ->press('Login')
        ->waitForLocation('/dashboard')
        ->assertSee('Welcome back');
});
```

That test runs **unchanged** under Dawn.

Contents
--------

[](#contents)

- [Why Dawn is a game-changer](#why-dawn-is-a-game-changer)
- [Migrate in 3 steps](#migrate-in-3-steps)
- [Installation](#installation)
- [Configuration](#configuration)
- [Databases](#databases)
- [Compatibility](#compatibility)
- [Roadmap](#roadmap)

Why Dawn is a game-changer
--------------------------

[](#why-dawn-is-a-game-changer)

Dusk's flakiness and ops overhead come almost entirely from **WebDriver**: a separate ChromeDriver binary you version-match by hand, and PHP-side polling loops that race the browser. Dawn keeps Dusk's ergonomics and deletes that layer.

Dusk (Selenium / ChromeDriver)**Dawn (Playwright)****Waiting**PHP-side polling loopsPlaywright's native auto-wait**Flakiness**Actions fire before the DOM is readyEvery action waits for actionability first**Browser setup**ChromeDriver binary + version drift`playwright install` - always matched**Browsers**ChromeChromium, Firefox, WebKit (`DAWN_BROWSER`)**Speed**Selenium wire protocolPlaywright's direct CDP transport**Your tests**-**Identical.** Only the base class changes.The best part: **there's nothing to learn.** You keep your test suite, your `@dusk` selectors, your `loginAs()`, your CI artifact paths. You delete the ChromeDriver plumbing and get a faster, less flaky run for free. → [Read the full rationale](https://igorgawrys1.github.io/dawn-docs/guide/why-a-game-changer)

Migrate in 3 steps
------------------

[](#migrate-in-3-steps)

```
# 1. Swap the package
composer remove laravel/dusk
composer require --dev gawrys/dawn
vendor/bin/playwright-install --browsers
```

```
  // 2. tests/DuskTestCase.php - swap the base class, drop the WebDriver plumbing
- use Laravel\Dusk\TestCase as BaseTestCase;
+ use Dawn\TestCase as BaseTestCase;
```

```
# 3. Run it
php artisan test --testsuite=Browser
```

Test classes that `use Laravel\Dusk\Browser;` for closure type-hints keep working as-is - when laravel/dusk is absent, Dawn aliases that class name automatically. Full walkthrough in the **[migration guide](https://igorgawrys1.github.io/dawn-docs/guide/migration)**.

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

[](#installation)

```
composer require --dev gawrys/dawn
vendor/bin/playwright-install --browsers
```

**Requirements:** PHP 8.2+ · Laravel 10, 11, 12 or 13 · Node.js 20+ (runs the Playwright engine).

`Dawn\DawnServiceProvider` is auto-discovered and registers the environment-gated `/_dawn/login`, `/_dawn/logout` and `/_dawn/user` routes that power `loginAs()` / `logout()` / `assertAuthenticated()` - the same out-of-process mechanism Dusk uses, never registered in production.

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

[](#configuration)

Env varDefaultMeaning`DAWN_BROWSER``chromium``chromium`, `firefox` or `webkit``DAWN_HEADLESS``true`Set `false` to watch the browserBase URL comes from `config('app.url')` / `APP_URL`, exactly like Dusk. Failure screenshots and console logs land in `tests/Browser/screenshots` and `tests/Browser/console` - the same paths as Dusk, so existing CI artifact globs keep working.

Databases
---------

[](#databases)

`DatabaseMigrations` and `DatabaseTruncation` work unchanged. `RefreshDatabase`cannot work - the browser talks to your app over HTTP in another process - so Dawn fails fast with a clear message instead of letting your suite fail mysteriously.

Compatibility
-------------

[](#compatibility)

The full method-by-method table lives in **[COMPATIBILITY.md](COMPATIBILITY.md)**. Anything not yet implemented throws a typed `Dawn\Exceptions\UnsupportedDuskMethod`naming the method and linking to the table - Dawn never approximates silently.

Dawn's own suite includes an acceptance class whose test bodies are byte-identical Dusk tests (including bodies ported from laravel/dusk's own repository), plus URL-assertion and selector-formatting cases ported verbatim from Dusk's unit suite.

Roadmap
-------

[](#roadmap)

As of v0.2.0 Dawn covers **~95%** of the Dusk `Browser` API (see the badge - it's measured automatically against the current upstream Dusk). The only unsupported methods are the ones that genuinely can't map onto the stack - OS-window `maximize()`/`move()`, interactive `tinker()`/`stop()`, and JavaScript dialogs (an engine deadlock, explained in [COMPATIBILITY.md](COMPATIBILITY.md)).

Out of scope by design: multi-browser matrix configuration, visual regression, device emulation, a Pest bridge.

Contributing
------------

[](#contributing)

Issues and PRs welcome - see [CONTRIBUTING.md](CONTRIBUTING.md). The golden rules: no WebDriver, no PHP-side waiting (CI-enforced), and Dusk's behaviour is the spec.

License
-------

[](#license)

MIT. Dawn is not affiliated with or endorsed by Laravel; "Dusk" refers to the laravel/dusk package whose public API Dawn reimplements.

###  Health Score

40

—

FairBetter than 86% of packages

Maintenance99

Actively maintained with recent releases

Popularity7

Limited adoption so far

Community7

Small or concentrated contributor base

Maturity39

Early-stage or recently created project

 Bus Factor1

Top contributor holds 100% 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 ~0 days

Total

4

Last Release

2d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/b7e3d761ee1d0092d6f4400cf56467f93fa413fbc1cb7bc2e9776903cb52f5f7?d=identicon)[gawrys](/maintainers/gawrys)

---

Top Contributors

[![igorgawrys1](https://avatars.githubusercontent.com/u/129420769?v=4)](https://github.com/igorgawrys1 "igorgawrys1 (11 commits)")

---

Tags

testinglaravelbrowser-testinge2eplaywrightdusk

###  Code Quality

Static AnalysisPHPStan

Code StyleLaravel Pint

### Embed Badge

![Health badge](/badges/gawrys-dawn/health.svg)

```
[![Health](https://phpackages.com/badges/gawrys-dawn/health.svg)](https://phpackages.com/packages/gawrys-dawn)
```

###  Alternatives

[orchestra/testbench

Laravel Testing Helper for Packages Development

2.2k42.5M41.5k](/packages/orchestra-testbench)[timacdonald/log-fake

A drop in fake logger for testing with the Laravel framework.

4236.6M69](/packages/timacdonald-log-fake)[hyvor/laravel-playwright

Laravel and Playwright E2E Testing

3419.9k](/packages/hyvor-laravel-playwright)

PHPackages © 2026

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