Ejemplo n.º 1
0
 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;
 }
Ejemplo n.º 2
0
 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;
 }