Class TolerantInteraction

java.lang.Object
com.version1.webdriver.utils.TolerantInteraction
Direct Known Subclasses:
ClearUtils, ClickUtils, GetAttributeUtils, GetTextUtils, RadioButtonUtils, SelectBoxUtils, SendKeysUtils

public class TolerantInteraction extends Object
  • Constructor Details

    • TolerantInteraction

      public TolerantInteraction()
  • Method Details

    • tolerantInteraction

      public org.openqa.selenium.WebElement tolerantInteraction(org.openqa.selenium.WebElement webElement, SelectBoxInteractionType selectBoxInteractionType, Optional<String> visibleTextOrHtmlValueString, Optional<Integer> itemIndex, int timeoutInSeconds) throws 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:
      Throwable - the last exception to be thrown
    • tolerantInteraction

      public org.openqa.selenium.WebElement tolerantInteraction(org.openqa.selenium.WebDriver webDriver, org.openqa.selenium.By locator, SelectBoxInteractionType selectBoxInteractionType, Optional<String> visibleTextOrHtmlValueString, Optional<Integer> itemIndex, int timeoutInSeconds) throws Throwable
      Parameters:
      locator -
      selectBoxInteractionType -
      visibleTextOrHtmlValueString -
      itemIndex -
      timeoutInSeconds -
      Returns:
      Throws:
      Throwable
    • tolerantInteraction

      public org.openqa.selenium.WebElement tolerantInteraction(List<org.openqa.selenium.WebElement> webElements, String visibleText, int timeoutInSeconds) throws 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:
      Throwable - the last exception to be thrown
    • tolerantInteraction

      public org.openqa.selenium.WebElement tolerantInteraction(org.openqa.selenium.WebElement webElement, Optional<String> textToType, int timeoutInSeconds) throws 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:
      Throwable - the last exception to be thrown
    • tolerantInteraction

      public org.openqa.selenium.WebElement tolerantInteraction(org.openqa.selenium.WebDriver webDriver, org.openqa.selenium.By locator, Optional<String> textToType, int timeoutInSeconds) throws Throwable
      Parameters:
      webDriver -
      locator -
      textToType -
      timeoutInSeconds -
      Returns:
      Throws:
      Throwable
    • tolerantInteractionToGetAttribute

      public String tolerantInteractionToGetAttribute(org.openqa.selenium.WebElement webElement, String attribute, int timeoutInSeconds) throws Throwable
      Parameters:
      webElement - locator we will use to re-lookup the element on retry
      attribute - WebElement attribute
      timeoutInSeconds - time to continue trying for
      Returns:
      attribute property value
      Throws:
      Throwable - the last exception to be thrown
    • tolerantInteractionToGetText

      public String tolerantInteractionToGetText(org.openqa.selenium.WebElement webElement, int timeoutInSeconds) throws Throwable
      Parameters:
      webElement - locator we will use to re-lookup the element on retry
      timeoutInSeconds - time to continue trying for
      Returns:
      text value of the WebElement
      Throws:
      Throwable - the last exception to be thrown
    • tolerantInteractionToClear

      public org.openqa.selenium.WebElement tolerantInteractionToClear(org.openqa.selenium.WebElement webElement, int timeoutInSeconds) throws 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:
      Throwable - the last exception to be thrown