This repository was archived by the owner on Jul 29, 2024. It is now read-only.
This repository was archived by the owner on Jul 29, 2024. It is now read-only.
sendKeys() only passes partial value #2019
Closed
Description
After upgrading to protractor 2.0 my login tests started failing.
In my PO I use the following function to handle input values:
function _input(parentElement, binding, value) {
var field = parentElement.element(by.model(binding)).element(by.css("input"));
if (value === undefined)
return field.getAttribute('value');
else
return field.clear().then(function() {
return field.sendKeys(value);
});
}
I found out that sendKeys only passes the first part of the value (always with a different length, sometimes one character sometimes n-1). Even if I make a conditional wait for the input to contain the whole value, the condition never gets fullfilled. It seems like sendKeys randomly stops sending keys from the value.