Fixed: Not selecting a datalabel used to issue a notice(undefined offset)
[phpmyadmin/ammaryasirr.git] / test / selenium / PmaSeleniumLoginTest.php
blob8f14fce8e601cce9ad04991397ad0a0a3caf29cd
1 <?php
2 /* vim: set expandtab sw=4 ts=4 sts=4: */
3 /**
4 * Selenium TestCase for login related tests
6 * @package phpMyAdmin-test
7 * @group Selenium
8 */
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()
21 $this->doLogin();
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++) {
30 if ($second >= 60)
31 $this->fail("Timeout waiting main page to load!");
32 try {
33 if ($this->isElementPresent("//*[@id=\"serverinfo\"]"))
34 break;
35 } catch (Exception $e) {
36 $this->fail("Exception: ".$e->getMessage());
38 sleep(1);