Skip to content

Commit

Permalink
Merge pull request #32 from minkphp/bugfix/fix-gettext
Browse files Browse the repository at this point in the history
Use innerText instead of selenium call
  • Loading branch information
aik099 authored Nov 1, 2024
2 parents 9567c6e + 70ff500 commit ea2ee82
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion src/WebdriverClassicDriver.php
Original file line number Diff line number Diff line change
Expand Up @@ -294,7 +294,11 @@ public function getText(
#[Language('XPath')]
string $xpath
): string {
return str_replace(["\r", "\n"], ' ', $this->findElement($xpath)->getText());
return str_replace(
["\r\n", "\r", "\n"],
' ',
$this->getElementDomProperty($this->findElement($xpath), 'innerText')
);
}

public function getHtml(
Expand Down

0 comments on commit ea2ee82

Please sign in to comment.