Translation update done using Pootle.
[phpmyadmin/ammaryasirr.git] / test / selenium / PmaSeleniumTestCase.php
blob90da6428e134d08339a3b211d02f9065a9f0854a
1 <?php
2 /* vim: set expandtab sw=4 ts=4 sts=4: */
3 /**
4 * Selenium parent class for TestCases
6 * @package phpMyAdmin-test
7 * @group Selenium
8 */
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
21 protected $selenium;
22 protected $cfg;
24 protected $captureScreenshotOnFailure = TRUE;
25 protected $screenshotPath = '/var/www/screenshots';
26 protected $screenshotUrl = 'http://localhost/screenshots';
28 public function setUp()
30 global $cfg;
31 $this->cfg =& $cfg;
32 //PHPUnit_Extensions_SeleniumTestCase::$browsers = $this->cfg['Test']['broswers'];
34 $this->setBrowserUrl(TESTSUITE_PHPMYADMIN_HOST . TESTSUITE_PHPMYADMIN_URL);
36 $this->start();
39 public function tearDown()
41 $this->stop();
44 /**
45 * perform a login
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);