2 /* vim: set expandtab sw=4 ts=4 sts=4: */
4 * Selenium TestCase for login related tests
6 * @package phpMyAdmin-test
10 require_once('PmaSeleniumTestCase.php');
13 class PmaSeleniumLoginTest
extends PmaSeleniumTestCase
15 protected $captureScreenshotOnFailure = TRUE;
16 protected $screenshotPath = '/var/www/screenshots';
17 protected $screenshotUrl = 'http://localhost/screenshots';
19 public function testLogin()
23 // Check if login error happend
24 if ($this->isElementPresent("//html/body/div/div[@class='error']")){
25 $this->fail($this->getText("//html/body/div/div[@class='error']"));
28 // Check server info heder is present //*[@id="serverinfo"]
29 for ($second = 0;; $second++
) {
31 $this->fail("Timeout waiting main page to load!");
33 if ($this->isElementPresent("//*[@id=\"serverinfo\"]"))
35 } catch (Exception
$e) {
36 $this->fail("Exception: ".$e->getMessage());