public function TraversableElement::clickLink in Zircon Profile 8
Same name and namespace in other branches
- 8.0 vendor/behat/mink/src/Element/TraversableElement.php \Behat\Mink\Element\TraversableElement::clickLink()
Clicks link with specified locator.
Parameters
string $locator link id, title, text or image alt:
Throws
File
- vendor/
behat/ mink/ src/ Element/ TraversableElement.php, line 65
Class
- TraversableElement
- Traversable element.
Namespace
Behat\Mink\ElementCode
public function clickLink($locator) {
$link = $this
->findLink($locator);
if (null === $link) {
throw new ElementNotFoundException($this
->getDriver(), 'link', 'id|title|alt|text', $locator);
}
$link
->click();
}