function TraversableElement::selectFieldOption
Selects option from select field with specified locator.
Parameters
string $locator input id, name or label:
string $value option value:
bool $multiple select multiple options:
Return value
void
Throws
See also
NodeElement::selectOption
File
-
vendor/
behat/ mink/ src/ Element/ TraversableElement.php, line 266
Class
- TraversableElement
- Traversable element.
Namespace
Behat\Mink\ElementCode
public function selectFieldOption(string $locator, string $value, bool $multiple = false) {
$field = $this->findField($locator);
if (null === $field) {
throw new ElementNotFoundException($this->getDriver(), 'form field', 'id|name|label|value', $locator);
}
$field->selectOption($value, $multiple);
}