Skip to content

Commit

Permalink
Merge pull request #11 from creative-commoners/pulls/1.1/textarea-fix
Browse files Browse the repository at this point in the history
FIX Get textarea value for recent version of chrome
  • Loading branch information
bergice authored May 10, 2021
2 parents 11279a0 + d7da53a commit f04435d
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions src/FacebookWebDriver.php
Original file line number Diff line number Diff line change
Expand Up @@ -694,6 +694,15 @@ public function getValue($xpath)
return $this->executeJsOnElement($element, $script);
}

// use textarea.value rather than textarea.getAttribute(value) for chrome 91+ support
if ('textarea' === $elementName) {
$script = <<<JS
var node = {{ELEMENT}};
return node.value;
JS;
return $this->executeJsOnElement($element, $script);
}

return $element->getAttribute('value');
}

Expand Down

0 comments on commit f04435d

Please sign in to comment.