定制 playwright-php/playwright-mink 二次开发

按需修改功能、优化性能、对接业务系统,提供一站式技术支持

邮箱:yvsm@zunyunkeji.com | QQ:316430983 | 微信:yvsm316

playwright-php/playwright-mink

最新稳定版本:v1.0.0

Composer 安装命令:

composer require playwright-php/playwright-mink

包简介

Mink driver powered by Playwright PHP (Chromium/Firefox/WebKit).

README 文档

README

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.

统计信息

  • 总下载量: 2
  • 月度下载量: 0
  • 日度下载量: 0
  • 收藏数: 0
  • 点击次数: 0
  • 依赖项目数: 0
  • 推荐数: 0

GitHub 信息

  • Stars: 0
  • Watchers: 0
  • Forks: 0
  • 开发语言: PHP

其他信息

  • 授权协议: MIT
  • 更新时间: 2025-10-13