Package com.version1.webdriver.utils
Class TolerantInteraction
java.lang.Object
com.version1.webdriver.utils.TolerantInteraction
- Direct Known Subclasses:
ClearUtils,ClickUtils,GetAttributeUtils,GetTextUtils,RadioButtonUtils,SelectBoxUtils,SendKeysUtils
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionorg.openqa.selenium.WebElementtolerantInteraction(List<org.openqa.selenium.WebElement> webElements, String visibleText, int timeoutInSeconds) org.openqa.selenium.WebElementtolerantInteraction(org.openqa.selenium.WebDriver webDriver, org.openqa.selenium.By locator, SelectBoxInteractionType selectBoxInteractionType, Optional<String> visibleTextOrHtmlValueString, Optional<Integer> itemIndex, int timeoutInSeconds) org.openqa.selenium.WebElementtolerantInteraction(org.openqa.selenium.WebDriver webDriver, org.openqa.selenium.By locator, Optional<String> textToType, int timeoutInSeconds) org.openqa.selenium.WebElementtolerantInteraction(org.openqa.selenium.WebElement webElement, SelectBoxInteractionType selectBoxInteractionType, Optional<String> visibleTextOrHtmlValueString, Optional<Integer> itemIndex, int timeoutInSeconds) org.openqa.selenium.WebElementtolerantInteraction(org.openqa.selenium.WebElement webElement, Optional<String> textToType, int timeoutInSeconds) org.openqa.selenium.WebElementtolerantInteractionToClear(org.openqa.selenium.WebElement webElement, int timeoutInSeconds) tolerantInteractionToGetAttribute(org.openqa.selenium.WebElement webElement, String attribute, int timeoutInSeconds) tolerantInteractionToGetText(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, Optional<String> visibleTextOrHtmlValueString, Optional<Integer> itemIndex, int timeoutInSeconds) throws 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:
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 retrytimeoutInSeconds- 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 retrytimeoutInSeconds- 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 retryattribute- WebElement attributetimeoutInSeconds- 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 retrytimeoutInSeconds- 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 retrytimeoutInSeconds- time to continue trying for- Returns:
- WebElement to allow fluent method stringed calls
- Throws:
Throwable- the last exception to be thrown
-