Product tour

Browser tests,
kept in PHP.

Use Playwright's browser engines, auto-waiting locators, retrying assertions, network control, and trace artifacts without adopting a JavaScript test runner.

Playwright engines

Real browsers

Drive Chromium, Firefox, and WebKit through Playwright's own driver, from PHP. Test rendering, JavaScript, network, and browser behavior without moving the suite to a JavaScript test runner.

Three engines
$chromium = Playwright::chromium();
$firefox = Playwright::firefox();
$webkit = Playwright::webkit();
Reliable targeting

Smart Locators

Target roles, labels, text, and test ids with typed locators. Each action resolves the current page and waits for the conditions it needs.

Auto-wait
$page
    ->getByRole(
        'button',
        ['name' => 'Sign in'],
    )
    ->click();
Wait for page state

Web-first Assertions

Assert the rendered result. Playwright retries against the page until the condition holds or the timeout is reached.

Retry, not sleep
expect(
    $page->getByRole('alert')
)->toContainText('Saved');
Control browser traffic

Network interception

Intercept matching browser requests: mock a response, block a third party, or let it through and read what came back.

Routing
$page->route(
    '**/api/orders',
    function ($route) {
    $route->fulfill([
        'body' => '{"orders":[]}',
    ]);
    },
);
Failure evidence

Trace-based debugging

Write a trace archive with DOM snapshots, console output, network activity, and screenshots from the run that failed.

Recording
$context->startTracing($page);

// ... the scenario ...

$context->stopTracing($page, 'trace.zip');
Browsers and devices

Browser and device contexts

Chromium, Firefox, WebKit, plus emulated devices with coherent viewports, touch support, scale factors, and user agents.

Presets
$device = (new DeviceRegistry())
    ->get('iPhone 15 Pro');

Playwright::webkit([
    'context' => $device->toArray(),
]);
For full suites

More browser capabilities for real application flows.

Symfony Bundle Kernel-aware tests, fixtures, responses, and profiler evidence.

Start with one
PHP script.

Install the PHP client and browser binaries, then run a real navigation and assertion.