Skip to content
A php client for webdriver.
Latest commit 7ae357c Jun 5, 2016 @gfosco gfosco Merge pull request #302 from twindual/community
Fixed issue #301 - Hardcoded 'em' namespace in installExtension() prevents some extensions from loading

php-webdriver – WebDriver bindings for PHP


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

This WebDriver client aims to be as close as possible to bindings in other languages. The concepts are very similar to the Java, .NET, Python and Ruby bindings for WebDriver.

This is new version of PHP client, rewritten from scratch starting 2013. Using the old version? Check out Adam Goucher's fork of it at

Looking for API documentation of php-webdriver? See

Any complaint, question, idea? You can post it on the user group


Installation is possible using Composer.

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

curl -sS | php

Then install the library:

php composer.phar require facebook/webdriver

Getting started

All you need as the server for this client is the selenium-server-standalone-#.jar file provided here:

Download and run that file, replacing # with the current server version.

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

Then when you create a session, be sure to pass the url to where your server is running.

// This would be the url of the host running the server-standalone.jar
$host = 'http://localhost:4444/wd/hub'; // this is the default
  • Launch Firefox:

    $driver = RemoteWebDriver::create($host, DesiredCapabilities::firefox());
  • Launch Chrome:

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

You can also customize the desired capabilities:

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


For latest changes see file.

More information

Check out the Selenium docs and wiki at and

Learn how to integrate it with PHPUnit Blogpost | Demo Project


We have a great community willing to try and help you!

Currently we offer support in two manners:

Via our Facebook Group

If you have questions or are an active contributor consider joining our facebook group and contributing to the communal discussion and support

Via Github

If you're reading this you've already found our Github repository. If you have a question, feel free to submit it as an issue and our staff will do their best to help you as soon as possible.


We love to have your help to make php-webdriver better. See for more information about contributing and developing php-webdriver.

Something went wrong with that request. Please try again.