I wrote the following method to clear the input field:
/** * Очищает поле ввода у элемента * * @param locator локатора элемента xpath или css */ public AbstractPage sendButtonPressesBackSpace(String locator) { logger.info(String.format("Очищает поле ввода у элемента {%s}", locator)); SelenideElement el = getSelenideElement(locator); while (el.val().length() != 0) el.sendKeys(Keys.BACK_SPACE); return this; }
This is done because Angular processes only user actions and setValue("")
does not work properly ...
The question is: Does Selenium or Selenide have methods for zeroing the element? for I could not find them
sendKeys(Keys.BACK_SPACE)
method - sevnight