Selenium WebDriver

This project is not covered by Drupal’s security advisory policy.

WebDriver module implements the WebDriver API for the simpletest module with the PHP binding library php-webdriver.

In a nutshell, WebDriver is the evolution of Selenium Core and Selenium RC (remote control), which are well-known to be browser automation tools. The WebDriver APIs are focused on driving the browser from the user's point of view.
It aims at executing tests on multiple remote browsers with native events instead of injecting javascript (synthetic events).
From the Selenium project was born the JSON wire protocol and a W3C spec.
In that way, API is consistent and any servers which implements the protocol and follow the spec could be used in transparency by a same client.

This module override the default DrupalWebTestCase simpletest class to :

  • set up a test environnement with simpletest sandbox and launching browsers with required/desired capabilities (i.e : version, platform, etc).
  • override existing methods with their equivalent in the WebDriver API. In an optimistic approach, you may be able to simply replace the inherited parent class by this one.
  • provide some methods helper/examples around the php-webdriver library
  • provide some work-around for existing issues of drivers

The following browsers are currently supported, but with some degrees :

Remote WebDriver allow you to test browsers on different machine and thus, you could test browsers in different scenarios such as by :

  • platform. For e.g, Firefox on : Linux, Mac, Windows, and so on.
  • version. For e.g, Internet explorer 8 or Internet explorer 9.
  • platform version, emulator/real device, screen size (selendroid only).

This module provide you a way to set different config per browsers to execute your tests.

Selenium Grid make multiple tests executions on further remote servers in parallel possible ! Appium could register nodes on a Selenium Grid, so you can test in parallel desktop and mobile browsers. And Selendroid server has its own Grid plugin.
This module embed a PHP script which allow you to execute test in parallel.

Stop using a cURL user-agent for your functionnal tests, drive browsers instead !
You would be able to test backend as well as frontend :

  • javascript
  • AJAX
  • cookies
  • advanced user actions like dragNdrop
  • History navigation
  • windows switch
  • HTML5
  • alert/prompt/confirm
  • iframe

and much more...

This module is still under active developpement but hope a RC would be released soon.

Similar projects

Supporting organizations: 

Project information

  • Module categories: Developer Tools
  • Created by chaby on , updated
  • shield alertThis project is not covered by the security advisory policy.
    Use at your own risk! It may have publicly disclosed vulnerabilities.

Releases