Exemple #1
0
 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"));
       });
 }
Exemple #2
0
 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);
   }
 }