We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
InlineElement and Element instances are created without checking if the selector would return an actual html node.
Either getElement should return null, or we need a way to verify that element exists ($element->isPresent()?).
getElement
$element->isPresent()
The text was updated successfully, but these errors were encountered:
It seems that I also need it, even more than #4 :P @jakzal what do you think about something like that
abstract class Page { // ... /** * @param string $name * * @return Element */ protected function getElement($name) { $element = isset($this->elements[$name]) ? $this->pageFactory->createInlineElement($this->elements[$name]) : $this->pageFactory->createElement($name); if (!$this->has('xpath', $element->getXpath())) { throw new UnexpectedPageException(sprintf('"%s" element is not available on the %s', $name, $this->getName())); } return $element; } // ... }
This should be enough, at least for cases that I can imagine.
Sorry, something went wrong.
No branches or pull requests
InlineElement and Element instances are created without checking if the selector would return an actual html node.
Either
getElement
should return null, or we need a way to verify that element exists ($element->isPresent()
?).The text was updated successfully, but these errors were encountered: