Skip to content

Commit

Permalink
Normalize behavior of "getText" method (#52)
Browse files Browse the repository at this point in the history
Normalize behavior of "getText" method
  • Loading branch information
aik099 authored Dec 3, 2024
1 parent 9640be7 commit 48e5773
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/WebdriverClassicDriver.php
Original file line number Diff line number Diff line change
Expand Up @@ -296,11 +296,11 @@ public function getText(
#[Language('XPath')]
string $xpath
): string {
return str_replace(
["\r\n", "\r", "\n"],
return trim(str_replace(
["\r\n", "\r", "\n", "\xc2\xa0"],
' ',
$this->getElementDomProperty($this->findElement($xpath), 'innerText')
);
));
}

public function getHtml(
Expand Down

0 comments on commit 48e5773

Please sign in to comment.