Class TolerantInteraction

java.lang.Object
uk.co.evoco.webdriver.utils.TolerantInteraction
Direct Known Subclasses:
ClickUtils, RadioButtonUtils, SelectBoxUtils, SendKeysUtils

public class TolerantInteraction
extends java.lang.Object
  • Constructor Summary

    Constructors 
    Constructor Description
    TolerantInteraction()  
  • Method Summary

    Modifier and Type Method Description
    org.openqa.selenium.WebElement tolerantInteraction​(java.util.List<org.openqa.selenium.WebElement> webElements, java.lang.String visibleText, int timeoutInSeconds)  
    org.openqa.selenium.WebElement tolerantInteraction​(org.openqa.selenium.WebElement webElement, java.util.Optional<java.lang.String> textToType, int timeoutInSeconds)  
    org.openqa.selenium.WebElement tolerantInteraction​(org.openqa.selenium.WebElement webElement, SelectBoxInteractionType selectBoxInteractionType, java.util.Optional<java.lang.String> visibleTextOrHtmlValueString, java.util.Optional<java.lang.Integer> itemIndex, int timeoutInSeconds)  

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Constructor Details

  • Method Details

    • tolerantInteraction

      public org.openqa.selenium.WebElement tolerantInteraction​(org.openqa.selenium.WebElement webElement, SelectBoxInteractionType selectBoxInteractionType, java.util.Optional<java.lang.String> visibleTextOrHtmlValueString, java.util.Optional<java.lang.Integer> itemIndex, int timeoutInSeconds) throws java.lang.Throwable
      Parameters:
      webElement - active WebElement
      selectBoxInteractionType - type of selection for the interaction
      visibleTextOrHtmlValueString - Optional - the HTML value of the select box or the visible text
      itemIndex - Optional - the index item to select in the select box
      timeoutInSeconds - time to continue trying for
      Returns:
      WebElement to allow fluent method stringed calls
      Throws:
      java.lang.Throwable - the last exception to be thrown
    • tolerantInteraction

      public org.openqa.selenium.WebElement tolerantInteraction​(java.util.List<org.openqa.selenium.WebElement> webElements, java.lang.String visibleText, int timeoutInSeconds) throws java.lang.Throwable
      Parameters:
      webElements - list of locators we will use to re-lookup the element on retry
      timeoutInSeconds - time to continue trying for
      Returns:
      WebElement to allow fluent method stringed calls
      Throws:
      java.lang.Throwable - the last exception to be thrown
    • tolerantInteraction

      public org.openqa.selenium.WebElement tolerantInteraction​(org.openqa.selenium.WebElement webElement, java.util.Optional<java.lang.String> textToType, int timeoutInSeconds) throws java.lang.Throwable
      Parameters:
      webElement - locator we will use to re-lookup the element on retry
      timeoutInSeconds - time to continue trying for
      Returns:
      WebElement to allow fluent method stringed calls
      Throws:
      java.lang.Throwable - the last exception to be thrown