Skip to content

Configuration

Environment variables

VariableDefaultMeaning
DAWN_BROWSERchromiumchromium, firefox, or webkit
DAWN_HEADLESStrueSet to false to watch the browser while tests run

Base URL

Resolved from config('app.url') (APP_URL), like Dusk. Override per suite by overriding baseUrl() on your test case:

php
protected function baseUrl(): string
{
    return 'http://127.0.0.1:8000';
}

Timeouts

Dawn\Browser::$waitSeconds (default 5) controls both the default waitFor* timeout and the actionability timeout applied to every Playwright action. Individual waits accept an explicit $seconds argument, as in Dusk.

Artifacts

On failure, each browser writes:

  • a full-page screenshot to tests/Browser/screenshots/failure-<test>-<n>.png
  • captured console output to tests/Browser/console/<test>-<n>.log

storeSource() writes page HTML to tests/Browser/source. All paths match Dusk's, so existing CI artifact globs keep working. They are static properties on Dawn\Browser ($storeScreenshotsAt, $storeConsoleLogAt, $storeSourceAt) if you need to relocate them.

Selector attribute

php
Dawn\Dawn::selectorHtmlAttribute('data-testid'); // default: 'dusk'

Node & browsers

The Playwright engine runs on Node.js (20+), spawned automatically as a sidecar process - one per PHP process, shut down at process exit. Install or update browsers with:

bash
vendor/bin/playwright-install --browsers     # local
vendor/bin/playwright-install --with-deps    # CI (adds OS dependencies)

Released under the MIT License. Not affiliated with Laravel.