Skip to content
This repository has been archived by the owner on Mar 20, 2024. It is now read-only.
/ playwright-php Public archive

A PHP Module, that help with geneting of task script for playwright and send it to node.js

License

Notifications You must be signed in to change notification settings

luka-dev/playwright-php

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

57 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

playwright-php

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);

About

A PHP Module, that help with geneting of task script for playwright and send it to node.js

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages