Class TolerantInteraction

java.lang.Object
uk.co.evoco.webdriver.utils.TolerantInteraction
Direct Known Subclasses:
ClearUtils, ClickUtils, GetAttributeUtils, GetTextUtils, 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.WebDriver webDriver, org.openqa.selenium.By locator, java.util.Optional<java.lang.String> textToType, int timeoutInSeconds)  
    org.openqa.selenium.WebElement tolerantInteraction​(org.openqa.selenium.WebDriver webDriver, org.openqa.selenium.By locator, SelectBoxInteractionType selectBoxInteractionType, java.util.Optional<java.lang.String> visibleTextOrHtmlValueString, java.util.Optional<java.lang.Integer> itemIndex, 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)  
    org.openqa.selenium.WebElement tolerantInteractionToClear​(org.openqa.selenium.WebElement webElement, int timeoutInSeconds)  
    java.lang.String tolerantInteractionToGetAttribute​(org.openqa.selenium.WebElement webElement, java.lang.String attribute, int timeoutInSeconds)  
    java.lang.String tolerantInteractionToGetText​(org.openqa.selenium.WebElement webElement, 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​(org.openqa.selenium.WebDriver webDriver, org.openqa.selenium.By locator, SelectBoxInteractionType selectBoxInteractionType, java.util.Optional<java.lang.String> visibleTextOrHtmlValueString, java.util.Optional<java.lang.Integer> itemIndex, int timeoutInSeconds) throws java.lang.Throwable
      Parameters:
      locator -
      selectBoxInteractionType -
      visibleTextOrHtmlValueString -
      itemIndex -
      timeoutInSeconds -
      Returns:
      Throws:
      java.lang.Throwable
    • 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
    • tolerantInteraction

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

      public java.lang.String tolerantInteractionToGetAttribute​(org.openqa.selenium.WebElement webElement, java.lang.String attribute, int timeoutInSeconds) throws java.lang.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:
      java.lang.Throwable - the last exception to be thrown
    • tolerantInteractionToGetText

      public java.lang.String tolerantInteractionToGetText​(org.openqa.selenium.WebElement webElement, 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:
      text value of the WebElement
      Throws:
      java.lang.Throwable - the last exception to be thrown
    • tolerantInteractionToClear

      public org.openqa.selenium.WebElement tolerantInteractionToClear​(org.openqa.selenium.WebElement webElement, 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