Created
January 22, 2016 05:34
-
-
Save chrisl8888/f4d90b91416355b04f7a to your computer and use it in GitHub Desktop.
protractor wait for item to be present with promise - stolen from http://docsplendid.com/archives/209
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
browser.wait(function() { | |
var deferred = protractor.promise.defer(); | |
element(by.id('some-element')).isPresent() | |
.then(function (isPresent) { | |
deferred.fulfill(!isPresent); | |
}); | |
return deferred.promise; | |
}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment