2 /* vim: set expandtab sw=4 ts=4 sts=4: */
4 * Selenium parent class for TestCases
6 * @package phpMyAdmin-test
10 // Optionally add the php-client-driver to your include path
11 //set_include_path(get_include_path() . PATH_SEPARATOR . '/opt/selenium-remote-control-1.0.1/selenium-php-client-driver-1.0.1/PEAR/');
13 // Include the main phpMyAdmin user config
14 // currently only $cfg['Test'] is used
15 require_once 'config.sample.inc.php';
19 class PmaSeleniumTestCase
extends PHPUnit_Extensions_SeleniumTestCase
24 protected $captureScreenshotOnFailure = TRUE;
25 protected $screenshotPath = '/var/www/screenshots';
26 protected $screenshotUrl = 'http://localhost/screenshots';
28 public function setUp()
32 //PHPUnit_Extensions_SeleniumTestCase::$browsers = $this->cfg['Test']['broswers'];
34 $this->setBrowserUrl(TESTSUITE_PHPMYADMIN_HOST
. TESTSUITE_PHPMYADMIN_URL
);
39 public function tearDown()
47 public function doLogin()
49 $this->open(TESTSUITE_PHPMYADMIN_URL
);
50 // Somehow selenium does not like the language selection on the cookie login page, forced English in the config for now.
51 //$this->select("lang", "label=English");
53 $this->waitForPageToLoad("30000");
54 $this->type("input_username", TESTSUITE_USER
);
55 $this->type("input_password", TESTSUITE_PASSWORD
);
56 $this->click("input_go");
57 $this->waitForPageToLoad("30001");
61 * Just a dummy to show some example statements
63 public function mockTest()
65 // Slow down the testing speed, ideal for debugging
66 //$this->setSpeed(4000);