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

Convert Selenium IDE PHP output to Drupal SimpleTest format.

To use:

  1. Download the Selenium IDE.
  2. Record a test or portion of a test.
  3. Export the test as PHP (File -> Export Test Case As -> PHP).
  4. Paste contents of exported test into conversion form (admin/config/development/simpletest_selenium).
  5. Copy all or part of converted test into desired SimpleTest.

For use with Drupal 6:

  1. Change core = 7.x to core = 6.x in the .info file.
  2. (Optional) Change the menu path from admin/config/development/simpletest_selenium to admin/configuration/simpletest_selenium in the .module file.

For example:

require_once 'PHPUnit/Extensions/SeleniumTestCase.php';

class Example extends PHPUnit_Extensions_SeleniumTestCase
  function setUp()

  function testMyTestCase()
    $this->assertTrue($this->isTextPresent("Transparency and Choice"));
    $this->assertEquals("Google Privacy Center", $this->getTitle());
    $this->click("link=privacy principles");
    $this->type("q", "search");

Turns into:

// $Id$

 * @file

class Example extends DrupalWebTestCase {

  public static function getInfo() {
    return array(
      'name' => 'Example',
      'description' => '...',
      'group' => 'Example',

  protected function testExample() {
    $this->assertText(t('Transparency and Choice'));
    $this->assertTitle(t('Google Privacy Center'));
    $this->clickLink(t('privacy principles'));
    $edit = array (
      'q' => 'search',
    $this->drupalPost(NULL, $edit, t('submit'));

Sponsored by Clarity Digital Group (owners of and

Project Information

  • Maintenance status: Unknown
  • Development status: Under active development
  • Downloads: 1,590
  • Last modified: 27 November 2014
  • shield alertThis project is not covered by the security advisory policy.
    Use at your own risk! It may have publicly disclosed vulnerabilities.