protected function matches($nodes) { /** @var $nodes DomCrawler **/ if (!$nodes->count()) { return false; } if ($this->string === '') { return true; } foreach ($nodes as $node) { if (parent::matches($node->nodeValue)) { return true; } } return false; }
protected function matches($nodes) { if (!count($nodes)) { return false; } if ($this->string === '') { return true; } foreach ($nodes as $node) { /** @var $node \WebDriverElement **/ if (!$node->isDisplayed()) { continue; } if (parent::matches(htmlspecialchars_decode($node->getText()))) { return true; } } return false; }