Introducing PHPWebDriver

As I mentioned in a survey of the php and selenium landscape I hinted that I was going to likely create my own PHP WebDriver implementation. And sorta have.

PHPWebDriver is a fork of the Facebook’s php-webdriver project with a few couple differences which have moved it from the Github definition of ‘fork’ to the more traditional one.

  • Distributed via PEAR – which sounds simple, but meant that some class name changes to meet the PEAR conventions for things rather than just Facebook’s.
  • Added the WebDriverWait class
  • Added ActionChains (even if a bunch of them do not yet have implementations)
  • Cleaning up the interface a bit to be less tightly coupled to the WebDriver wire protocol

To get started with PHPWebDriver you need to have a working PEAR installation (which can be a bit of a challenge…)

$ sudo pear channel-discover element-34.github.com/pear
$ sudo pear install -f element-34/PHPWebDriver

For now, the best documentation is available in the project’s README but examples are slowly starting to show up in this blog too.

PHPWebDriver is Open Source and distributed under the Apache 2 license (as is the rest of the Selenium suite) which means you are free to use it without having to pay me a cent. I am however offering commercial support and priority bug fixing; contact me for information.

There is no official PHP binding for WebDriver, and this one is not either. But it takes the one that was closest to the core protocol, makes it distributable in the PHP’s package system and adds the bits of the WebDriver suite not specified in the protocol.

Trackbacks & Pingbacks 2

  1. From A Smattering of Selenium #77 « Official Selenium Blog on 30 Jan 2012 at 8:53 pm

    […] Introducing PHPWebDriver I unleash some code upon the world Advertisement GA_googleAddAttr("AdOpt", "1"); […]

  2. From A Smattering of Selenium #80 « Official Selenium Blog on 07 Feb 2012 at 8:07 pm

    […] for Python is fantastic. Requests for PHP looks to be equally so. (I suspect my php webdriver bindings are about to become a much larger fork of the Facebook […]

Post a Comment

Your email is never published nor shared. Required fields are marked *