(String Zone, String SearchElement, String Direction, int Offset, int SwipeTime, String ElementFindZone, String ElementToFind, int ElementToFindIndex, int Delay, int Rounds, Boolean Click)
Swipe inside a component to search for an element or text.
- Zone - Zone of the container element
- SearchElement - The container element identifier
- Direction - Direction to swipe
- Offset - Swipe offset
- Swipe Time – Time for the swipe action
- Element to find Zone - Zone of the sought element
- Element to find - The sought element identifier
- Element to Find Index – The sought element’s index (i.e., the number of times the element appears after the first appearance minus two). Index=0 refers to the first appearance of the element; Index=1 refers to the second appearance of the element, etc.
- Delay - Time to wait before sending a command (in milliseconds)
- Rounds - Maximum swipe rounds
- Click - Click the found element if TRUE
Scenario: In this example, we will use the ElementSwipeWhileNotFound command to scroll down in the IMDB application menu, and select the "History" option.
- Component Zone: Will be set to NATIVE
- Component Element: will be set to id=nav_drawer (This will identify the menu object itself, where the swipe action is going to be performed).
- Direction: Down
- Offset: 0
- Swipe Time: 2000
- Element Find Zone: NATIVE
- Element To Find: will be set to text=History (The command will swipe the menu container until this object is found).
- Element To Find Index: 0
- Delay: 1000
- Rounds: 5
- Click: true (will click the "History" object once it is found).
List will be scrolled to the bottom until Label History is found.
Once found it will be clicked