- * Click the text within the selected element.
- * @param $parentElement
- * @param $linkText
- * @return $this
- */
- protected function clickInElement($parentElement, $linkText)
- {
- $elem = $this->crawler->filter($parentElement);
- $link = $elem->selectLink($linkText);
- $this->visit($link->link()->getUri());
- return $this;
- }
-
- /**
- * Check if the page contains the given element.
- * @param string $selector
- * @return bool
- */
- protected function pageHasElement($selector)
- {
- $elements = $this->crawler->filter($selector);
- $this->assertTrue(count($elements) > 0, "The page does not contain an element matching " . $selector);
- return $this;
- }
-
- /**
- * Check if the page contains the given element.
- * @param string $selector
- * @return bool