Skip to content

Commit 0f020ab

Browse files
authored
Normalize behavior of "getText" method (#404)
Normalize behavior of "getText" method
1 parent c085ffb commit 0f020ab

1 file changed

Lines changed: 3 additions & 3 deletions

File tree

src/Selenium2Driver.php

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -673,11 +673,11 @@ public function getTagName(string $xpath)
673673

674674
public function getText(string $xpath)
675675
{
676-
return str_replace(
677-
array("\r\n", "\r", "\n"),
676+
return trim(str_replace(
677+
array("\r\n", "\r", "\n", "\xc2\xa0"),
678678
' ',
679679
$this->executeJsOnXpath($xpath, 'return {{ELEMENT}}.innerText;')
680-
);
680+
));
681681
}
682682

683683
public function getHtml(string $xpath)

0 commit comments

Comments
 (0)