From e6f91c8562b0d8261b767e600f7adfbad285794a Mon Sep 17 00:00:00 2001 From: Deven Bansod Date: Tue, 18 Jul 2017 19:01:51 +0530 Subject: [PATCH] Fix xss related tests Signed-off-by: Deven Bansod --- test/selenium/PmaSeleniumXssTest.php | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/test/selenium/PmaSeleniumXssTest.php b/test/selenium/PmaSeleniumXssTest.php index 95e99f4cc2..d88254c07e 100644 --- a/test/selenium/PmaSeleniumXssTest.php +++ b/test/selenium/PmaSeleniumXssTest.php @@ -18,6 +18,11 @@ require_once 'TestBase.php'; */ class PMA_SeleniumXSSTest extends PMA_SeleniumBase { + public function setUpPage() + { + parent::setUpPage(); + $this->login(); + } /** * Tests the SQL query tab with a null query * @@ -30,8 +35,7 @@ class PMA_SeleniumXSSTest extends PMA_SeleniumBase if (mb_strtolower($this->getBrowser()) == 'safari') { $this->markTestSkipped('Alerts not supported on Safari browser.'); } - $this->login(); - $this->waitForElement('byLinkText', "SQL")->click(); + $this->waitForElement('byPartialLinkText', "SQL")->click(); $this->waitForElement("byId", "queryboxf"); $this->byId("button_submit_query")->click(); $this->assertEquals("Missing value in the form!", $this->alertText());