public function TraversableElement::pressButton in Zircon Profile 8
Same name and namespace in other branches
- 8.0 vendor/behat/mink/src/Element/TraversableElement.php \Behat\Mink\Element\TraversableElement::pressButton()
Presses button (input[type=submit|image|button|reset], button) with specified locator.
Parameters
string $locator button id, value or alt:
Throws
File
- vendor/
behat/ mink/ src/ Element/ TraversableElement.php, line 107
Class
- TraversableElement
- Traversable element.
Namespace
Behat\Mink\ElementCode
public function pressButton($locator) {
$button = $this
->findButton($locator);
if (null === $button) {
throw new ElementNotFoundException($this
->getDriver(), 'button', 'id|name|title|alt|value', $locator);
}
$button
->press();
}