public final class AndroidHelper
| Type Params | Return Type | Name and description |
|---|---|---|
|
public static WebElement |
findElementContainingText(WebElement scrollableView, String text) |
|
public static WebElement |
findScrollableElement(AppiumDriver driver) |
|
public static int |
getStatusBarHeight(AppiumDriver driver) |
|
public static WebElement |
scrollToText(TestObject testObject, String text, Direction direction, int timeoutInSeconds)Scrolls within the specified TestObject's view to find an element that contains the given text. |
|
public static WebElement |
scrollToTextHorizontal(TestObject testObject, String text, int timeoutInSeconds)Scrolls horizontally within the specified TestObject's view to locate an element containing the given text. |
|
public static WebElement |
scrollToTextVertical(TestObject testObject, String text, int timeoutInSeconds)Scrolls vertically within the specified TestObject's view to locate an element containing the given text. |
Scrolls within the specified TestObject's view to find an element that contains
the given text. The scroll direction (vertical or horizontal) is determined by
the provided direction parameter.
testObject - the TestObject representing the scrollable container;
if null, the method will attempt to detect a scrollable view automaticallytext - the visible text to search fordirection - the scroll direction (VERTICAL or HORIZONTAL)timeoutInSeconds - the maximum time to continue scrollingnull Scrolls horizontally within the specified TestObject's view to locate an element
containing the given text. This method is a convenience wrapper that uses
Direction.HORIZONTAL.
testObject - the TestObject representing the scrollable container;
if null, the method will attempt to detect a horizontal scrollable view automaticallytext - the visible text to search fortimeoutInSeconds - the maximum time to continue scrollingnull Scrolls vertically within the specified TestObject's view to locate an element
containing the given text. This method is a convenience wrapper that uses
Direction.VERTICAL.
testObject - the TestObject representing the scrollable container;
if null, the method will attempt to detect a vertical scrollable view automaticallytext - the visible text to search fortimeoutInSeconds - the maximum time to continue scrollingnull