PHPackages                             itnelo/reactphp-webdriver - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [Testing &amp; Quality](/categories/testing)
4. /
5. itnelo/reactphp-webdriver

ActiveLibrary[Testing &amp; Quality](/categories/testing)

itnelo/reactphp-webdriver
=========================

An async, W3C compliant PHP client for Selenium Grid server (hub)

0.4.0(5y ago)4261[1 issues](https://github.com/itnelo/reactphp-webdriver/issues)1MITPHPPHP &gt;=7.4

Since Dec 2Pushed 5y ago2 watchersCompare

[ Source](https://github.com/itnelo/reactphp-webdriver)[ Packagist](https://packagist.org/packages/itnelo/reactphp-webdriver)[ Docs](https://github.com/itnelo/reactphp-webdriver)[ RSS](/packages/itnelo-reactphp-webdriver/feed)WikiDiscussions master Synced 1w ago

READMEChangelog (5)Dependencies (6)Versions (7)Used By (1)

ReactPHP WebDriver
==================

[](#reactphp-webdriver)

This is a direct port of [RemoteWebDriver](https://github.com/php-webdriver/php-webdriver/blob/1.8.3/lib/Remote/RemoteWebDriver.php)logic from the [php-webdriver/webdriver](https://github.com/php-webdriver/php-webdriver) package, which utilizes [ReactPHP](https://github.com/reactphp/reactphp)event loop and promise API for browser interaction w/o execution flow blocking.

**Selenium WebDriver** is a software that is used to manipulate browsers from the code (primarily, for testing and web scraping). You can find more here: .

This PHP client sends async HTTP requests to the [Grid](https://www.selenium.dev/documentation/en/grid). It is a central endpoint for commands, a bridge between your code and browser instances. See [SeleniumHQ/docker-selenium](https://github.com/SeleniumHQ/docker-selenium) to get your own remote browser (or a cluster).

Enjoy!

Requirements
------------

[](#requirements)

- **PHP 7.4** or higher.
- ReactPHP v1 (http **^1**, stream **^1**).
- Symfony conflicts: 5.1 (or newer) environments are preferred; the package uses (and will use) some components from there, and their code / version constraints may need a review, to include a wider range of supported environments (otherwise, you need to adjust your platform).

Installation
------------

[](#installation)

With [composer](https://getcomposer.org/download):

```
$ composer require itnelo/reactphp-webdriver:^0.4

```

How to use
----------

[](#how-to-use)

Call a factory method to get your instance (recommended). The minimal configuration is:

```
use React\EventLoop\Factory as LoopFactory;
use Itnelo\React\WebDriver\WebDriverFactory;

$loop = LoopFactory::create();

$webDriver = WebDriverFactory::create(
    $loop,
    [
        'hub' => [
            'host' => 'selenium-hub',
            'port' => 4444,
        ],
    ]
);
```

You can customize a set of parameters for the underlying [ReactPHP Browser](https://github.com/reactphp/http#browser)and tune driver options:

```
use React\EventLoop\Factory as LoopFactory;
use Itnelo\React\WebDriver\WebDriverFactory;

$loop = LoopFactory::create();

$webDriver = WebDriverFactory::create(
    $loop,
    [
        'browser' => [
            'tcp' => [
                'bindto' => '192.169.56.10:0',
            ],
            'tls' => [
                'verify_peer' => false,
                'verify_peer_name' => false,
            ],
        ],
        'hub' => [
            'host' => 'selenium-hub',
            'port' => 4444,
        ],
        'command' => [
            'timeout' => 30,
        ],
    ]
);
```

Manual configuration (if you prefer to configure each component as a separate service, e.g. compiling a DI container and want to reuse existing service definitions):

```
use React\EventLoop\Factory as LoopFactory;
use React\Socket\Connector as SocketConnector;
use React\Http\Browser;
use Itnelo\React\WebDriver\Client\W3CClient;
use Itnelo\React\WebDriver\Timeout\Interceptor as TimeoutInterceptor;
use Itnelo\React\WebDriver\SeleniumHubDriver;

$loop = LoopFactory::create();

$socketConnector = new SocketConnector(
    $loop,
    [
        'tcp' => [
            'bindto' => '192.169.56.10:0',
        ],
        'tls' => [
            'verify_peer' => false,
            'verify_peer_name' => false,
        ],
    ]
);
$browser = new Browser($loop, $socketConnector);
$browser = $browser->withRejectErrorResponse(false);

$hubClient = new W3CClient(
    $browser,
    [
        'server' => [
            'host' => 'selenium-hub',
            'port' => 4444,
        ],
    ]
);

$timeoutInterceptor = new TimeoutInterceptor($loop, 30);

$webDriver = new SeleniumHubDriver(
    $loop,
    $hubClient,
    $timeoutInterceptor
);
```

See a self-documented [WebDriverInterface.php](src/WebDriverInterface.php) (and [ClientInterface.php](src/ClientInterface.php)) for the API details. Not all methods and arguments are ported (only the most necessary), so feel free to open an issue / make a pull request if you want more.

See also
--------

[](#see-also)

- [php-webdriver/webdriver](https://github.com/php-webdriver/php-webdriver) — the original, "blocking" implementation; to get information how to use some advanced methods. For example, [WebDriverKeys](https://github.com/php-webdriver/php-webdriver/blob/main/lib/WebDriverKeys.php#L10)helper describes Unicode strings for sending special inputs to page elements (e.g. `Ctrl`, `Alt` and other keys).

Changelog
---------

[](#changelog)

All notable changes to this project will be documented in [CHANGELOG.md](CHANGELOG.md).

###  Health Score

24

—

LowBetter than 32% of packages

Maintenance15

Infrequent updates — may be unmaintained

Popularity15

Limited adoption so far

Community10

Small or concentrated contributor base

Maturity48

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 100% of commits — single point of failure

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

###  Release Activity

Cadence

Every ~17 days

Total

6

Last Release

1909d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/9846fb3e0b9baad2f926476f9b5e6a032909ff9d8cbd0b01074a677d64822b4b?d=identicon)[itnelo](/maintainers/itnelo)

---

Top Contributors

[![itnelo](https://avatars.githubusercontent.com/u/2988715?v=4)](https://github.com/itnelo "itnelo (39 commits)")

---

Tags

php-webdriverphp74reactphpseleniumselenium-gridwebdriverphpreactphpseleniumwebdriver

### Embed Badge

![Health badge](/badges/itnelo-reactphp-webdriver/health.svg)

```
[![Health](https://phpackages.com/badges/itnelo-reactphp-webdriver/health.svg)](https://phpackages.com/packages/itnelo-reactphp-webdriver)
```

###  Alternatives

[php-webdriver/webdriver

A PHP client for Selenium WebDriver. Previously facebook/webdriver.

5.2k90.0M127](/packages/php-webdriver-webdriver)[behat/mink-selenium2-driver

Selenium2 (WebDriver) driver for Mink framework

51159.1M666](/packages/behat-mink-selenium2-driver)[instaclick/php-webdriver

PHP WebDriver for Selenium 2

43661.8M22](/packages/instaclick-php-webdriver)[lmc/steward

Steward - makes Selenium WebDriver + PHPUnit testing easy and robust

222163.1k1](/packages/lmc-steward)[clue/docker-react

Async, event-driven access to the Docker Engine API, built on top of ReactPHP.

113154.9k1](/packages/clue-docker-react)[peridot-php/webdriver-manager

Library and command line tool for managing Selenium WebDriver

3535.1k1](/packages/peridot-php-webdriver-manager)

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
