Protractor: Waiting for text to be mutable
I think you can make things more reliable by having a custom wait that will issue a .clear()
method call repeatedly and stop only when the input becomes empty or a timeout is reached:
var titleInput = this.element(this.by.model('appModel.qTitle'));browser.wait(function () { titleInput.clear(); return titleInput.getAttribute('value').then(function (inputValue) { return !inputValue; });}, 5000);
Thanks for the input everyone! This is definitely a timing issue with the Angular application itself and not just me incorrectly using Protractor.