You are here

public function Element::has in Zircon Profile 8

Same name and namespace in other branches
  1. 8.0 vendor/behat/mink/src/Element/Element.php \Behat\Mink\Element\Element::has()

Checks whether element with specified selector exists inside the current element.

Parameters

string $selector selector engine name:

string|array $locator selector locator:

Return value

Boolean

Overrides ElementInterface::has

See also

ElementInterface::findAll for the supported selectors

3 calls to Element::has()
DocumentElement::hasContent in vendor/behat/mink/src/Element/DocumentElement.php
Check whether document has specified content.
TraversableElement::hasSelect in vendor/behat/mink/src/Element/TraversableElement.php
Checks whether element has a select field with specified locator.
TraversableElement::hasTable in vendor/behat/mink/src/Element/TraversableElement.php
Checks whether element has a table with specified locator.

File

vendor/behat/mink/src/Element/Element.php, line 103

Class

Element
Base element.

Namespace

Behat\Mink\Element

Code

public function has($selector, $locator) {
  return null !== $this
    ->find($selector, $locator);
}