Expected undefined to equal 7.
We recently started using Protractor for end to end testing of an angular application. Protractor returns promises when locating elements on the page, in some cases you may need to do your assertions inside of callback functions.
For example:
1 2 3 4 5 6 7 8 9 10 |
|
You can use the elementexplorer to debug your locators, but be aware that even non-matched elements will return an ‘Element Finder’ object.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 |
|
However, invoking one of the methods on an unmatched element will raise a NoSuchElementError
.
Resources: