waitForExist
Wait for an element (selected by css selector) for the provided amount of milliseconds to be present within the DOM. Returns true if the selector matches at least one element that exists in the DOM, otherwise throws an error. If the reverse flag is true, the command will instead return true if the selector does not match any elements.
Usage
1 | browser.waitForExist(selector[,ms][,reverse]); |
Parameters
Param | Type | Details |
---|---|---|
selector | String | CSS selector to query |
ms optional |
Number | time in ms (default: 500) |
reverse optional |
Boolean | if true it instead waits for the selector to not match any elements (default: false) |
Example
1 | it('should display a notification message after successful form submit', function () { |