Skip to content

Commit

Permalink
Fix the right method -_-
Browse files Browse the repository at this point in the history
  • Loading branch information
uuf6429 committed Nov 1, 2024
1 parent ca0b23e commit da4b11f
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/WebdriverClassicDriver.php
Original file line number Diff line number Diff line change
Expand Up @@ -294,14 +294,14 @@ public function getText(
#[Language('XPath')]
string $xpath
): string {
return str_replace(["\r", "\n"], ' ', $this->findElement($xpath)->getText());
return $this->getElementDomProperty($this->findElement($xpath), 'innerText');
}

public function getHtml(
#[Language('XPath')]
string $xpath
): string {
return $this->getElementDomProperty($this->findElement($xpath), 'innerText');
return $this->getElementDomProperty($this->findElement($xpath), 'innerHTML');
}

public function getOuterHtml(
Expand Down

0 comments on commit da4b11f

Please sign in to comment.