luka-dev / playwright-php
This package is abandoned and no longer maintained.
The author suggests using the luka-dev/headless-task-server-php package instead.
A PHP Module, that help with generating of task script for playwright and send it node.js
1.1.13.1
2021-07-22 11:25 UTC
Requires
- php: >=7.3
- ext-curl: *
- ext-json: *
- php-curl-class/php-curl-class: 8.* || 9.*
Requires (Dev)
- phpunit/phpunit: ^9.3
README
Install with composer
composer require luka-dev/playwright-php
A PHP Module, that help with generating of task script for playwright and send it node.js server
All detailed information here
Code example
$connectionConfig = new \ConnectionConfig('localhost'); $contextConfig = new ContextConfig(); $contextConfig->setUserAgent('Custom UserAgent'); $contextConfig->setProxy( 'protocol://address:port', null, 'username', 'password' ); $taskServer = new \TaskServer($connectionConfig, $contextConfig); $script = new Context(); $page = $script->newPage(); $page->goto('https://2ip.ru/'); $element = $page->query('div.ip'); $element->textContentToVar('ip'); $script->resolve('ip'); $response = $taskServer->runTask($script);