public void setInputTextLambda(Supplier<By> by, String value) { Retry retry = new Retry(5, 1, TimeUnit.SECONDS); retry.attempt( () -> { Element element = findElement(by); element.clear(); element.sendKeys(value); assert value.equals(element.getAttribute("value")); }); }
public void textInput(Supplier<By> by, String value) { Retry retry = new Retry(5, 1, TimeUnit.SECONDS); try { retry.attempt( () -> { Element element = findElement(by); element.clear(); element.sendKeys(value); // assert value.equals(element.getAttribute("value")); }); } catch (Exception e) { log.info("Failed to set text {}", value); } }