public class WaitHelper extends Object
| Modifier and Type | Field and Description |
|---|---|
static double |
WAIT_LONG_SECONDS |
static double |
WAIT_MED_SECONDS |
static double |
WAIT_PAN_SECONDS |
static double |
WAIT_SHORT_SECONDS |
static double |
WAIT_ZOOM_SECONDS |
| Constructor and Description |
|---|
WaitHelper() |
| Modifier and Type | Method and Description |
|---|---|
boolean |
mobile_waitAndRefreshForElementToLoad(EnhancedBy target)
waits for element to load And refreshes the app each time to renew the dom
|
void |
waitForAdditionalElementsToLoad(EnhancedBy target,
int originalCount)
waits for element count to increase from the originalCount Usefull When
waiting for a list to expand with additional items
|
boolean |
waitForClassContain(EnhancedBy target,
int index,
String value) |
boolean |
waitForClassContain(EnhancedBy target,
int index,
String value,
int time) |
boolean |
waitForElementToBeClickable(EnhancedBy selector) |
boolean |
waitForElementToBeClickable(EnhancedBy target,
int time) |
void |
waitForElementToBeRemoved(EnhancedBy target)
waits for element to not be displayed wait for maximum of 60 seconds
|
boolean |
waitForElementToBeRemoved(EnhancedBy target,
int time)
waits for element to not be displayed
|
boolean |
waitForElementToLoad(EnhancedBy target)
waits for element to be displayed for amount of time specified by 60 seconds
|
boolean |
waitForElementToLoad(EnhancedBy target,
int time)
waits for element to load count() checks if the element is displayed Then
gets the count number
|
boolean |
waitForElementToLoad(EnhancedBy target,
int time,
int count)
waits for element to load If mobile device, scrolls down the page until
element is visible
|
boolean |
waitForFirstElementToLoad(EnhancedBy element1,
EnhancedBy element2)
waits for either element to load returns true When first item loads
|
boolean |
waitForFirstElementToLoad(EnhancedBy element1,
EnhancedBy element2,
EnhancedBy element3)
waits for either element to load returns true When first item loads
|
boolean |
waitForFirstElementToLoad(EnhancedBy element1,
EnhancedBy element2,
EnhancedBy element3,
int time)
waits for either element to load returns true When first item loads
|
boolean |
waitForFirstElementToLoad(EnhancedBy element1,
EnhancedBy element2,
int time)
waits for either element to load returns true When first item loads
|
void |
waitForListItemToLoad_Contains(EnhancedBy list,
String option)
waits for item containing in list to load
|
void |
waitForPageToLoad()
waits for web page to load
|
void |
waitForSeconds(double seconds)
waits for number of seconds
|
void |
waitForTextToLoad(EnhancedBy target,
int time,
String text)
make sure only one element And caller needs to take responsibility to have
text in the element
|
void |
waitForTextToLoad(EnhancedBy target,
String text)
waits for text to be loaded for amount of time specified by 60 seconds
|
public static final double WAIT_SHORT_SECONDS
public static final double WAIT_MED_SECONDS
public static final double WAIT_LONG_SECONDS
public static final double WAIT_ZOOM_SECONDS
public static final double WAIT_PAN_SECONDS
public boolean waitForElementToLoad(EnhancedBy target)
target - public boolean waitForElementToLoad(EnhancedBy target, int time)
target - time - public boolean waitForElementToLoad(EnhancedBy target, int time, int count)
target: - element to wait fortime: - max time to waitcount: - minimum count of elements to wait for in listpublic boolean mobile_waitAndRefreshForElementToLoad(EnhancedBy target)
target - public boolean waitForFirstElementToLoad(EnhancedBy element1, EnhancedBy element2)
element1 - element2 - time - public boolean waitForFirstElementToLoad(EnhancedBy element1, EnhancedBy element2, int time)
element1 - element2 - time - public boolean waitForFirstElementToLoad(EnhancedBy element1, EnhancedBy element2, EnhancedBy element3)
element1 - element2 - time - public boolean waitForFirstElementToLoad(EnhancedBy element1, EnhancedBy element2, EnhancedBy element3, int time)
element1 - element2 - time - public void waitForAdditionalElementsToLoad(EnhancedBy target, int originalCount)
target - originalCount - public void waitForElementToBeRemoved(EnhancedBy target)
target - public boolean waitForElementToBeRemoved(EnhancedBy target, int time)
target - time - : maximum amount of time in seconds to waitpublic void waitForSeconds(double seconds)
seconds - public void waitForPageToLoad()
public void waitForListItemToLoad_Contains(EnhancedBy list, String option)
list - option - time - public void waitForTextToLoad(EnhancedBy target, String text)
target - public void waitForTextToLoad(EnhancedBy target, int time, String text)
target - time - public boolean waitForElementToBeClickable(EnhancedBy selector)
public boolean waitForElementToBeClickable(EnhancedBy target, int time)
public boolean waitForClassContain(EnhancedBy target, int index, String value)
public boolean waitForClassContain(EnhancedBy target, int index, String value, int time)
Copyright © 2019. All rights reserved.