Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions src/Selenium4Driver.php
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}
Expand All @@ -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
Expand Down Expand Up @@ -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)
Expand Down