luka-dev / playwright-php
A PHP Module, that help with generating of task script for playwright and send it node.js
Installs: 12 048
Dependents: 0
Suggesters: 0
Security: 0
Stars: 9
Watchers: 1
Forks: 1
Open Issues: 0
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);