From fa90e0ddda8f8885ecb7187d5f9dd6f2a6fa814d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Michal=20=C4=8Ciha=C5=99?= Date: Mon, 24 Feb 2014 08:44:47 +0100 Subject: [PATCH 1/3] Wait for More link MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Michal Čihař --- test/selenium/TestBase.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/test/selenium/TestBase.php b/test/selenium/TestBase.php index 1bf4e3faa6..b1bc7b478a 100644 --- a/test/selenium/TestBase.php +++ b/test/selenium/TestBase.php @@ -419,7 +419,7 @@ abstract class PMA_SeleniumBase extends PHPUnit_Extensions_Selenium2TestCase public function expandMore() { try { - $more = $this->byCssSelector('li.submenu > a'); + $more = $this->waitForElement('byCssSelector', 'li.submenu > a'); } catch (PHPUnit_Extensions_Selenium2TestCase_WebDriverException $e) { return; } From de42bc1b49d08fc660846bb121dcbde0c155a95c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Michal=20=C4=8Ciha=C5=99?= Date: Mon, 24 Feb 2014 08:46:27 +0100 Subject: [PATCH 2/3] Click on database name in navigation panel MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Michal Čihař --- test/selenium/PmaSeleniumImportTest.php | 1 - 1 file changed, 1 deletion(-) diff --git a/test/selenium/PmaSeleniumImportTest.php b/test/selenium/PmaSeleniumImportTest.php index 7a12acfe68..3d31a13084 100644 --- a/test/selenium/PmaSeleniumImportTest.php +++ b/test/selenium/PmaSeleniumImportTest.php @@ -86,7 +86,6 @@ class PMA_SeleniumImportTest extends PMA_SeleniumBase ); // go to database page - $this->byLinkText("Databases")->click(); $this->waitForElement("byLinkText", $this->database_name)->click(); $this->waitForElement( "byXPath", From 770edd0cf44fdea4fd6b8e40307482c9a8a270ef Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Michal=20=C4=8Ciha=C5=99?= Date: Mon, 24 Feb 2014 08:49:21 +0100 Subject: [PATCH 3/3] Ensure login is performed after doing it MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Michal Čihař --- test/selenium/TestBase.php | 2 ++ 1 file changed, 2 insertions(+) diff --git a/test/selenium/TestBase.php b/test/selenium/TestBase.php index b1bc7b478a..65ca4e9c1a 100644 --- a/test/selenium/TestBase.php +++ b/test/selenium/TestBase.php @@ -244,6 +244,8 @@ abstract class PMA_SeleniumBase extends PHPUnit_Extensions_Selenium2TestCase $passwordField = $this->byId('input_password'); $passwordField->value($password); $this->byId('input_go')->click(); + /* Wait for loading the page */ + $this->waitForElement("byLinkText", $this->database_name); } /**