Skip to content
New issue

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

sometimes $results['value']['ELEMENT'] is not defined inside WebDriver.php line 368 #21

Open
ghost opened this issue Oct 29, 2013 · 1 comment

Comments

@ghost
Copy link

ghost commented Oct 29, 2013

added this line

if (!isset($results['value']['ELEMENT'])) throw new SeleniumNoSuchElementException();

I dunno if thats the best error to throw, but its better than leaving it completely unhandled and getting notices.

return new WebElement($this, $results['value']['ELEMENT']);#just showing this line for reference

@thekeyboardbum
Copy link

Ran into the same issue, but instead used

return isset($results['value']['ELEMENT']) ? new WebElement($this, $results['value']['ELEMENT']) : null;

The function is be triggered by waitForElementUntilIsPresent() when used By::id(), so throwing a exception isn't the best solution imo.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant