public function Element::find in Zircon Profile 8
Same name and namespace in other branches
- 8.0 vendor/behat/mink/src/Element/Element.php \Behat\Mink\Element\Element::find()
Finds first element with specified selector inside the current element.
Parameters
string $selector selector engine name:
string|array $locator selector locator:
Return value
NodeElement|null
Overrides ElementInterface::find
See also
ElementInterface::findAll for the supported selectors
7 calls to Element::find()
- Element::has in vendor/
behat/ mink/ src/ Element/ Element.php - Checks whether element with specified selector exists inside the current element.
- NodeElement::getParent in vendor/
behat/ mink/ src/ Element/ NodeElement.php - Returns parent element to the current one.
- NodeElement::selectOption in vendor/
behat/ mink/ src/ Element/ NodeElement.php - Selects specified option for select field or specified radio button in the group.
- TraversableElement::findButton in vendor/
behat/ mink/ src/ Element/ TraversableElement.php - Finds button (input[type=submit|image|button|reset], button) with specified locator.
- TraversableElement::findById in vendor/
behat/ mink/ src/ Element/ TraversableElement.php - Finds element by its id.
File
- vendor/
behat/ mink/ src/ Element/ Element.php, line 144
Class
- Element
- Base element.
Namespace
Behat\Mink\ElementCode
public function find($selector, $locator) {
$items = $this
->findAll($selector, $locator);
return count($items) ? current($items) : null;
}