Skip to content Skip to sidebar Skip to footer

Failed: Cannot Read Property 'getwebelements' Of Undefined

I am new to protractor test. it seems getWebelement is missing. the version of my protector is 3.0.0. another properties are fine (such as click, evaluate ...) browser.wait(element

Solution 1:

browser.wait(element(by.id('some-element')).isPresent());

you are missing the parenthesis after isPresent...

and after getWebElement...

browser.wait(element(by.id('some-element')).getWebElement());

Solution 2:

You'll need to wrap the call to isPresent() in a function, like so:

browser.wait(function() {
  returnelement(by.id('some-element')).isPresent();
})

so that isPresent() runs each time browser.wait calls it.

Post a Comment for "Failed: Cannot Read Property 'getwebelements' Of Undefined"