Let's say I have this input element:
<input id="email" value="[email protected]">
I execute this piece of code:
var emailInputField = driver.FindElement(By.Id(email));
var email = emailInputField.GetAttribute("value");
emailInputField .InputField.Clear();
var empty = emailInputField.GetAttribute("value");
I would expect variable empty to be empty but it contains same text as email since I cleared the text. I realize that value attribute doesn't get synchronized with entered text, so my question is, how do I find out what text currently is in the text box?