Skip to content

playwright-php/playwright-mink

Repository files navigation

Playwright PHP

  PHP Version   CI   Release   License

Playwright PHP - Mink Driver

A Mink driver powered by Playwright PHP.

Important

This package is experimental. Its API may still change before the upcoming 1.0 release.

Curious or interested? Try it out, share your feedback, or ideas!

Features

  • Run real browsers: Chromium, Firefox, WebKit (headless or not)
  • Control the DOM: navigation, forms, cookies, JS, events
  • Handle windows, iframes, uploads, screenshots, dialogs

Installation

Requirements

Install the driver

composer require --dev playwright-php/playwright-mink

Usage

use Behat\Mink\Session;
use Playwright\Mink\Driver\PlaywrightDriver;

$driver = new PlaywrightDriver(browserType: 'chromium', headless: true);
$session = new Session($driver);

$session->start();
$session->visit('https://example.org');

echo $session->getPage()->getText();

$session->stop();

Testing

This driver is validated against the official minkphp/driver-testsuite.

Test Results: 212/218 tests passing (97.2%) with 491 assertions

Start the test server

vendor/bin/mink-test-server

Run tests

vendor/bin/phpunit

Known Limitations

6 tests are skipped due to known limitations:

  • jQuery UI Drag & Drop (2 tests): jQuery UI uses mouse events API, Playwright uses HTML5 Drag & Drop API - these are incompatible
  • Popup Window Tracking (4 tests): Async event timing with window.open() requires improvements in Playwright PHP event handling

License

This package is released by the Playwright PHP project under the MIT License. See the LICENSE file for details.

Releases

No releases published

Sponsor this project

 

Languages