Package uk.co.evoco.webdriver.utils
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.WebElementtolerantInteraction(java.util.List<org.openqa.selenium.WebElement> webElements, java.lang.String visibleText, int timeoutInSeconds)org.openqa.selenium.WebElementtolerantInteraction(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.WebElementtolerantInteraction(org.openqa.selenium.WebElement webElement, java.util.Optional<java.lang.String> textToType, int timeoutInSeconds)org.openqa.selenium.WebElementtolerantInteraction(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.WebElementtolerantInteractionToClear(org.openqa.selenium.WebElement webElement, int timeoutInSeconds)java.lang.StringtolerantInteractionToGetAttribute(org.openqa.selenium.WebElement webElement, java.lang.String attribute, int timeoutInSeconds)java.lang.StringtolerantInteractionToGetText(org.openqa.selenium.WebElement webElement, int timeoutInSeconds)
-
Constructor Details
-
TolerantInteraction
public TolerantInteraction()
-
-
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 WebElementselectBoxInteractionType- type of selection for the interactionvisibleTextOrHtmlValueString- Optional - the HTML value of the select box or the visible textitemIndex- Optional - the index item to select in the select boxtimeoutInSeconds- 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 retrytimeoutInSeconds- 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 retrytimeoutInSeconds- time to continue trying for- Returns:
- WebElement to allow fluent method stringed calls
- Throws:
java.lang.Throwable- the last exception to be thrown
-
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 retryattribute- WebElement attributetimeoutInSeconds- 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 retrytimeoutInSeconds- 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 retrytimeoutInSeconds- time to continue trying for- Returns:
- WebElement to allow fluent method stringed calls
- Throws:
java.lang.Throwable- the last exception to be thrown
-