/** * Locates elements using the locator. * * @return NodeElement[] * @throws ElementNotFoundException When element wasn't found on the page. */ protected function locateElements() { $elements = $this->locator->findAll(); if (empty($elements)) { throw new ElementNotFoundException('No elements found by selector: ' . (string) $this->locator); } return $elements; }