Skip to content

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

Open

Description

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

Activity

  1. thekeyboardbum commented on Apr 1, 2014

    @thekeyboardbum

    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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions