I am trying to get text from password field, as I need it to pass the test case.
Currently I am trying to do it with this
_passwordInput.SendKeys(user.Password);
Assert.Equals(_passwordInput.Text, user.Password);
However when it gets to the assert, it fails as it compares the user.Password
value and returned value, which consists of only asterisks "*"
Tried it with GetAttrubute("value")
, but got the same result
_passwordInput.SendKeys(user.Password);
Assert.Equals(_passwordInput.GetAttribute("value"), user.Password);
For now I changed the assert so that it would compare lengths of value
_passwordInput.SendKeys(user.Password);
Assert.Equals(_passwordInput.Text.Length, user.Password.Length);
Is there any way to get the text instead of asterisk, or should I just use the length?