PHPackages                             facebook/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. facebook/webdriver

Abandoned → [php-webdriver/webdriver](/?search=php-webdriver%2Fwebdriver)ArchivedLibrary[Testing &amp; Quality](/categories/testing)

facebook/webdriver
==================

A PHP client for Selenium WebDriver

1.7.1(6y ago)6540.4M↑17.4%20Apache-2.0PHPPHP ^5.6 || ~7.0

Since Sep 10Pushed 6y ago1 watchersCompare

[ Source](https://github.com/php-webdriver/php-webdriver-archive)[ Packagist](https://packagist.org/packages/facebook/webdriver)[ Docs](https://github.com/facebook/php-webdriver)[ RSS](/packages/facebook-webdriver/feed)WikiDiscussions community Synced 1mo ago

READMEChangelogDependencies (9)Versions (27)Used By (20)

This is archived version.
=========================

[](#this-is-archived-version)

Use [php-webdriver](https://github.com/php-webdriver/php-webdriver) as up-to-date replacement.
==============================================================================================

[](#use-php-webdriver-as-up-to-date-replacement)

php-webdriver – Selenium WebDriver bindings for PHP
---------------------------------------------------

[](#php-webdriver--selenium-webdriver-bindings-for-php)

[![Latest Stable Version](https://camo.githubusercontent.com/df2e1fa9c40cbdaf7287ca1024f4a1ef69fbbcb5abf42ae8ea6718532fcca9de/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f762f66616365626f6f6b2f7765626472697665722e7376673f7374796c653d666c61742d737175617265)](https://packagist.org/packages/facebook/webdriver)[![Total Downloads](https://camo.githubusercontent.com/28cf482358b8d681b22784404fb5a720d63f1e282d976618f440513b840d4910/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f64742f66616365626f6f6b2f7765626472697665722e7376673f7374796c653d666c61742d737175617265)](https://packagist.org/packages/facebook/webdriver)[![License](https://camo.githubusercontent.com/e5c1c64de7bf591b88306db6170e758732d17eb30d284cd53d3cd0679d291688/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f6c2f66616365626f6f6b2f7765626472697665722e7376673f7374796c653d666c61742d737175617265)](https://packagist.org/packages/facebook/webdriver)

Description
-----------

[](#description)

Php-webdriver library is PHP language binding for Selenium WebDriver, which allows you to control web browsers from PHP.

This library is compatible with Selenium server version 2.x, 3.x and 4.x.

The library supports [JsonWireProtocol](https://github.com/SeleniumHQ/selenium/wiki/JsonWireProtocol) and also implements **experimental support** of [W3C WebDriver](https://w3c.github.io/webdriver/webdriver-spec.html). The W3C WebDriver support is not yet full-featured, however it should allow to control Firefox via Geckodriver and new versions of Chrome and Chromedriver with just a slight limitations.

The concepts of this library are very similar to the "official" Java, .NET, Python and Ruby bindings from the [Selenium project](https://github.com/SeleniumHQ/selenium/).

Looking for API documentation of php-webdriver? See [https://facebook.github.io/php-webdriver/](https://facebook.github.io/php-webdriver/latest/)

Any complaints, questions, or ideas? Post them in the user group .

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

[](#installation)

Installation is possible using [Composer](https://getcomposer.org/).

If you don't already use Composer, you can download the `composer.phar` binary:

```
curl -sS https://getcomposer.org/installer | php

```

Then install the library:

```
php composer.phar require facebook/webdriver

```

Getting started
---------------

[](#getting-started)

### Start Server

[](#start-server)

The required server is the `selenium-server-standalone-#.jar` file provided here:

Download and run the server by **replacing #** with the current server version. Keep in mind **you must have Java 8+ installed to run this command**.

```
java -jar selenium-server-standalone-#.jar

```

### Create a Browser Session

[](#create-a-browser-session)

When creating a browser session, be sure to pass the url of your running server.

```
// This would be the url of the host running the server-standalone.jar
$host = 'http://localhost:4444/wd/hub'; // this is the default url and port where Selenium server starts
```

##### Launch Chrome

[](#launch-chrome)

Install latest Chrome and [Chromedriver](https://sites.google.com/a/chromium.org/chromedriver/downloads).

The `chromedriver` binary must be placed in system `PATH` directory, otherwise you must provide the path when starting Selenium server (eg. `java -Dwebdriver.chrome.driver="/path/to/chromedriver" -jar selenium-server-standalone-#.jar`).

```
$driver = RemoteWebDriver::create($host, DesiredCapabilities::chrome());
```

##### Launch Firefox

[](#launch-firefox)

Install latest Firefox and [Geckodriver](https://github.com/mozilla/geckodriver/releases).

The `geckodriver` binary must be placed in system `PATH` directory, otherwise you must provide the path when starting Selenium server (eg. `java -Dwebdriver.gecko.driver="/path/to/geckodriver" -jar selenium-server-standalone-#.jar`).

```
$driver = RemoteWebDriver::create($host, DesiredCapabilities::firefox());
```

### Customize Desired Capabilities

[](#customize-desired-capabilities)

```
$desiredCapabilities = DesiredCapabilities::firefox();
$desiredCapabilities->setCapability('acceptSslCerts', false);
$driver = RemoteWebDriver::create($host, $desiredCapabilities);
```

- See  for more details.

**NOTE:** Above snippets are not intended to be a working example by simply copy-pasting. See [example.php](example.php) for working example.

Changelog
---------

[](#changelog)

For latest changes see [CHANGELOG.md](CHANGELOG.md) file.

More information
----------------

[](#more-information)

Some how-tos are provided right here in [our GitHub wiki](https://github.com/facebook/php-webdriver/wiki).

You may also want to check out the Selenium [docs](http://docs.seleniumhq.org/docs/) and [wiki](https://github.com/SeleniumHQ/selenium/wiki).

Testing framework integration
-----------------------------

[](#testing-framework-integration)

To take advantage of automatized testing you may want to integrate php-webdriver to your testing framework. There are some projects already providing this:

- [Steward](https://github.com/lmc-eu/steward) integrates php-webdriver directly to [PHPUnit](https://phpunit.de/), and provides parallelization
- [Codeception](http://codeception.com) testing framework provides BDD-layer on top of php-webdriver in its [WebDriver module](http://codeception.com/docs/modules/WebDriver)
- You can also check out this [blogpost](http://codeception.com/11-12-2013/working-with-phpunit-and-selenium-webdriver.html) + [demo project](https://github.com/DavertMik/php-webdriver-demo), describing simple [PHPUnit](https://phpunit.de/) integration

Support
-------

[](#support)

We have a great community willing to help you!

- **Via our Facebook Group** - If you have questions or are an active contributor consider joining our [facebook group](https://www.facebook.com/groups/phpwebdriver/) and contribute to communal discussion and support
- **Via StackOverflow** - You can also [ask a question](https://stackoverflow.com/questions/ask?tags=php+selenium-webdriver) or find many already answered question on StackOverflow
- **Via GitHub** - Another option if you have a question (or bug report) is to [submit it here](https://github.com/facebook/php-webdriver/issues/new) as a new issue

Contributing
------------

[](#contributing)

We love to have your help to make php-webdriver better. See [CONTRIBUTING.md](CONTRIBUTING.md) for more information about contributing and developing php-webdriver.

###  Health Score

48

—

FairBetter than 95% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity57

Moderate usage in the ecosystem

Community38

Small or concentrated contributor base

Maturity68

Established project with proven stability

 Bus Factor1

Top contributor holds 54.6% 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 ~87 days

Recently: every ~193 days

Total

25

Last Release

2531d ago

Major Versions

v0.6.0 → 1.0.02015-06-09

PHP version history (6 changes)v0.1PHP &gt;=5.3.0

v0.2PHP &gt;=5.4.0

v0.2.1PHP &gt;=5.4.20

v0.3PHP &gt;=5.3.19

1.2.0PHP ^5.5 || ~7.0

1.5.0PHP ^5.6 || ~7.0

### Community

Maintainers

![](https://avatars.githubusercontent.com/u/3757713?v=4)[Joel Marcey](/maintainers/JoelMarcey)[@JoelMarcey](https://github.com/JoelMarcey)

![](https://www.gravatar.com/avatar/a3e1e022cb274083d701b31cb634779f7f4a4e6464fa56a3d0b55f7f4a2487b9?d=identicon)[OndraM](/maintainers/OndraM)

![](https://www.gravatar.com/avatar/2806fb399db042ed389aee79ded5d403d829025fe952fcc1b24e64385756b4a4?d=identicon)[fosco](/maintainers/fosco)

---

Top Contributors

[![OndraM](https://avatars.githubusercontent.com/u/793041?v=4)](https://github.com/OndraM "OndraM (328 commits)")[![whhone](https://avatars.githubusercontent.com/u/1200104?v=4)](https://github.com/whhone "whhone (97 commits)")[![gfosco](https://avatars.githubusercontent.com/u/406732?v=4)](https://github.com/gfosco "gfosco (52 commits)")[![cbergau](https://avatars.githubusercontent.com/u/2446617?v=4)](https://github.com/cbergau "cbergau (21 commits)")[![v-slenter](https://avatars.githubusercontent.com/u/36268710?v=4)](https://github.com/v-slenter "v-slenter (15 commits)")[![dunglas](https://avatars.githubusercontent.com/u/57224?v=4)](https://github.com/dunglas "dunglas (12 commits)")[![andrewnicols](https://avatars.githubusercontent.com/u/370047?v=4)](https://github.com/andrewnicols "andrewnicols (11 commits)")[![ashleydw](https://avatars.githubusercontent.com/u/844437?v=4)](https://github.com/ashleydw "ashleydw (9 commits)")[![VolCh](https://avatars.githubusercontent.com/u/396345?v=4)](https://github.com/VolCh "VolCh (5 commits)")[![phelipealves](https://avatars.githubusercontent.com/u/2778150?v=4)](https://github.com/phelipealves "phelipealves (4 commits)")[![gkralik](https://avatars.githubusercontent.com/u/4949303?v=4)](https://github.com/gkralik "gkralik (4 commits)")[![okrad](https://avatars.githubusercontent.com/u/939812?v=4)](https://github.com/okrad "okrad (4 commits)")[![localheinz](https://avatars.githubusercontent.com/u/605483?v=4)](https://github.com/localheinz "localheinz (4 commits)")[![andrefortin](https://avatars.githubusercontent.com/u/26552025?v=4)](https://github.com/andrefortin "andrefortin (3 commits)")[![carusogabriel](https://avatars.githubusercontent.com/u/16328050?v=4)](https://github.com/carusogabriel "carusogabriel (3 commits)")[![Lctrs](https://avatars.githubusercontent.com/u/5477973?v=4)](https://github.com/Lctrs "Lctrs (3 commits)")[![jonstjohn](https://avatars.githubusercontent.com/u/95620?v=4)](https://github.com/jonstjohn "jonstjohn (2 commits)")[![danielbeardsley](https://avatars.githubusercontent.com/u/26855?v=4)](https://github.com/danielbeardsley "danielbeardsley (2 commits)")[![DavertMik](https://avatars.githubusercontent.com/u/220264?v=4)](https://github.com/DavertMik "DavertMik (2 commits)")[![davidsickmiller](https://avatars.githubusercontent.com/u/172005?v=4)](https://github.com/davidsickmiller "davidsickmiller (2 commits)")

---

Tags

phpfacebookseleniumwebdriver

###  Code Quality

TestsPHPUnit

Code StylePHP CS Fixer

### Embed Badge

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

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

###  Alternatives

[php-webdriver/webdriver

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

5.2k90.0M127](/packages/php-webdriver-webdriver)[symfony/panther

A browser testing and web scraping library for PHP and Symfony.

3.1k14.7M96](/packages/symfony-panther)[behat/mink-selenium2-driver

Selenium2 (WebDriver) driver for Mink framework

51159.1M666](/packages/behat-mink-selenium2-driver)[lmc/steward

Steward - makes Selenium WebDriver + PHPUnit testing easy and robust

222163.1k1](/packages/lmc-steward)[magium/magium

A browser/functional testing suite using Web Driver. Contains low-ish level functionality to quickly build browser/functional tests.

296.7k10](/packages/magium-magium)[magium/magento

Magento-based functionality for the Magium test library

275.4k2](/packages/magium-magento)

PHPackages © 2026

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