diff --git a/test/selenium/PmaSeleniumImportTest.php b/test/selenium/PmaSeleniumImportTest.php index 7a12acfe68e6..3d31a13084d2 100644 --- a/test/selenium/PmaSeleniumImportTest.php +++ b/test/selenium/PmaSeleniumImportTest.php @@ -86,7 +86,6 @@ public function testTableImport() ); // go to database page - $this->byLinkText("Databases")->click(); $this->waitForElement("byLinkText", $this->database_name)->click(); $this->waitForElement( "byXPath", diff --git a/test/selenium/TestBase.php b/test/selenium/TestBase.php index 1bf4e3faa6b6..65ca4e9c1a51 100644 --- a/test/selenium/TestBase.php +++ b/test/selenium/TestBase.php @@ -244,6 +244,8 @@ public function login($username = '', $password = '') $passwordField = $this->byId('input_password'); $passwordField->value($password); $this->byId('input_go')->click(); + /* Wait for loading the page */ + $this->waitForElement("byLinkText", $this->database_name); } /** @@ -419,7 +421,7 @@ public function typeInTextArea($text) public function expandMore() { try { - $more = $this->byCssSelector('li.submenu > a'); + $more = $this->waitForElement('byCssSelector', 'li.submenu > a'); } catch (PHPUnit_Extensions_Selenium2TestCase_WebDriverException $e) { return; }