Skip to content

Instantly share code, notes, and snippets.

@chrisjlee
Created January 22, 2016 05:34
Show Gist options
  • Save chrisjlee/f4d90b91416355b04f7a to your computer and use it in GitHub Desktop.
Save chrisjlee/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
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