I am writing a Protractor test, and, as part of the test, I want to clear the contents of a specific field (in a text field), and then use the sendKeys method to write some content to this text field.
Here is the code from my test:
var commentField = element(by.css('input[ng-model="comment"]'));
console.log(commentField);
commentField.clear();
commentField.sendKeys('Here is a comment');
The console log confirms that I really find the control, but as soon as it gets into the clear () method, the test just hangs.
Any ideas what could happen here?
source
share