From 2fce1a244077c6c92ccc975ac8103db5424d68ea Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Michal=20=C4=8Ciha=C5=99?= Date: Tue, 18 Mar 2014 16:57:01 +0100 Subject: [PATCH] Compatibility with Firefox webdriver MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Michal Čihař --- test/selenium/TestBase.php | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/test/selenium/TestBase.php b/test/selenium/TestBase.php index 429d27cbc0..810e9aac9b 100644 --- a/test/selenium/TestBase.php +++ b/test/selenium/TestBase.php @@ -440,6 +440,20 @@ abstract class PMA_SeleniumBase extends PHPUnit_Extensions_Selenium2TestCase */ public function typeInTextArea($text) { + /** + * Firefox needs some escaping of a text, see + * http://code.google.com/p/selenium/issues/detail?id=1723 + */ + if (strtolower($this->getBrowser()) == 'firefox') { + $text = str_replace( + "(", + PHPUnit_Extensions_Selenium2TestCase_Keys::SHIFT + . PHPUnit_Extensions_Selenium2TestCase_Keys::NUMPAD9 + . PHPUnit_Extensions_Selenium2TestCase_Keys::NULL, + $text + ); + } + $this->byClassName("CodeMirror-scroll")->click(); $this->keys($text); }