I ran into a little issue today while validating some input fields in our application.
Looks like we can't call the selenium java method clear()
to clear the input and I know I can iterate over the string and use sendKeys(Keys.Backspace)
but clear
method should do the work?
Anyone else ran into the same issue and how did you work around this problem.?
Our app is built upon Ant libraries
Selenium
String hotmarketNameEdit = "ant-input";
WebElement edit = driver.findElement(By.className(hotmarketNameEdit));
edit.click();
edit.clear();
HTML
<input type="text" id="label" class="ant-input ant-input-sm" value="AUTOMATION TEST - Thu Oct 21 09:54:15 MDT 2021" xpath="1">
Thanks for any inputs