I have been writing selenium scripts for a while in Java. I encountered a very weird issue today.
Here is the issue: I cleared a text field using webelement.clear()
Hope this helps to clear the field and then sendKeys() the needed value
sendKeys()
while (!inputField.getAttribute("value").equals("")) { inputField.sendKeys(Keys.BACK_SPACE); } inputField.sendKeys("your_value");