The Uiautomator method has mechanism to scroll vertically and horizontally to find/locate elements and it supports only forward scrolling at the moment and it does not support backward scrolling.
With this PR, there is new class added to support both forward and backward scrolling to element by vertically and horizontally and it is implemented within the class UiautomatorVerticallyScrollingFowardOrBackward and UiautomatorHorizontallyScrollingFowardOrBackward. The direction will be decided based on the input parameter direction which can be either FORWARD and BACKWARD.
The command to run scrolling forward/ backward vertically will be:
The Uiautomator method has mechanism to scroll vertically and horizontally to find/locate elements and it supports only forward scrolling at the moment and it does not support backward scrolling.
With this PR, there is new class added to support both forward and backward scrolling to element by vertically and horizontally and it is implemented within the class
UiautomatorVerticallyScrollingFowardOrBackward
andUiautomatorHorizontallyScrollingFowardOrBackward
. The direction will be decided based on the input parameterdirection
which can be eitherFORWARD
andBACKWARD
.The command to run scrolling forward/ backward vertically will be:
perform_action('uiautomator_vertically_scroll_forward_or_backward_to_element', 'direction','strategy', 'locator', 'max_scrolls')
the direction is either 'FORWARD' / 'BACKWARD'
The command to run scrolling forward or backward horizontally will be:
Horizontal:
perform_action('uiautomator_horizontally_scroll_forward_or_backward_to_element', 'direction', 'strategy', 'locator', 'max_scrolls')
the direction is either 'FORWARD' / 'BACKWARD'
more information on the other parameters/arguments can be found at https://github.com/calabash/calabash-android/wiki/UIAutomator2