diff --git a/src/Selenium4Driver.php b/src/Selenium4Driver.php index d7af27e6..0a195018 100755 --- a/src/Selenium4Driver.php +++ b/src/Selenium4Driver.php @@ -632,7 +632,7 @@ public function setValue(string $xpath, $value) throw new DriverException('Only string values can be used for a file input.'); } - $element->postValue(array('value' => array(strval($value)))); + $element->postValue(['text' => strval($value)]); return; } @@ -649,7 +649,7 @@ public function setValue(string $xpath, $value) $value = str_repeat(Key::BACKSPACE . Key::DELETE, $existingValueLength) . $value; } - $element->postValue(array('value' => array($value))); + $element->postValue(['text' => $value]); // Remove the focus from the element if the field still has focus in // order to trigger the change event. By doing this instead of simply // triggering the change event for the given xpath we ensure that the @@ -774,7 +774,7 @@ public function attachFile(string $xpath, string $path) $remotePath = $path; } - $element->postValue(array('value' => array($remotePath))); + $element->postValue(['text' => $remotePath]); } public function isVisible(string $xpath)