Translated using Weblate.
[phpmyadmin.git] / test / selenium / PmaSeleniumLoginTest.php
blob5e36564d69ef5e4ddca443afec226c2238e62b1a
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);