function TraversableElement::fillField
Fills in field (input, textarea, select) with specified locator.
Parameters
string $locator input id, name or label:
string|bool|array $value value:
Return value
void
Throws
See also
NodeElement::setValue
File
-
vendor/
behat/ mink/ src/ Element/ TraversableElement.php, line 158
Class
- TraversableElement
- Traversable element.
Namespace
Behat\Mink\ElementCode
public function fillField(string $locator, $value) {
$field = $this->findField($locator);
if (null === $field) {
throw new ElementNotFoundException($this->getDriver(), 'form field', 'id|name|label|value|placeholder', $locator);
}
$field->setValue($value);
}