diff --git a/src/Selenium2Driver.php b/src/Selenium2Driver.php index 11f911a9..917a4a47 100755 --- a/src/Selenium2Driver.php +++ b/src/Selenium2Driver.php @@ -638,8 +638,8 @@ public function getTagName(string $xpath) public function getText(string $xpath) { - return (string) str_replace( - array("\r", "\r\n", "\n"), + return str_replace( + array("\r\n", "\r", "\n"), ' ', $this->executeJsOnXpath($xpath, 'return {{ELEMENT}}.innerText;') );