public function TraversableElement::fillField in Zircon Profile 8
Same name and namespace in other branches
- 8.0 vendor/behat/mink/src/Element/TraversableElement.php \Behat\Mink\Element\TraversableElement::fillField()
Fills in field (input, textarea, select) with specified locator.
Parameters
string $locator input id, name or label:
string $value value:
Throws
See also
NodeElement::setValue
File
- vendor/
behat/ mink/ src/ Element/ TraversableElement.php, line 152
Class
- TraversableElement
- Traversable element.
Namespace
Behat\Mink\ElementCode
public function fillField($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);
}