Mobile tests can only find and interact with elements in the current page view. If you want to interact with elements outside the current page view, add scroll steps.
Swiping gestures can be achieved using the scrolling step.
When you scroll in the app, the Trainer automatically captures the direction of the scroll and the percentage of the screen scrolled. Depending on your goal, you can also add the following types of scroll steps:
Scrolling in the device screen
Scroll to element
To scroll until a specific element is visible on the screen, add a "scroll to element" step:
- Click on the plus sign to add a new step.
- Select Scroll to element.
- Freely scroll to bring the target element into view.
- Click on Select element.
- Select the target element on the page.
- Click OK to save the step.
The "scroll to element" step includes options for configuring the scrolling direction, the maximum number of scroll attempts, and selecting an element to scroll within. If mabl doesn't find the element within the scroll attempt threshold, the step will fail.
Scrolling to an element
Scrolling within an element
To interact with smaller scrollable elements such as pickers, add a "Scroll within element" step:
- Click on the plus sign to add a new step.
- Select Scroll to element.
- In the Scroll behavior menu, make sure the Type is set to "Scroll within element."
- Click on Select element.
- Select the element on the page that you want to scroll within.
- Click on Train scroll.
- Scroll within the bounds of that element. As you scroll, the direction and coordinates are captured.
- Click OK to save the step.
If needed, you can edit the scroll direction and scroll coordinates after the step is created.
Scrolling within an element