ScrollIntoView Method (MobileObject)

Class

MobileObject class

Action

Scroll until an object is visible. Works by dragging the scroll view in the indicated direction and then searching for the object, until either the object is found, or the repetition limit is reached (in which case an ObjectNotFoundException is thrown).

Syntax

object.ScrollIntoView(locatorString, direction, [repetitions, dragDistance, startPositionOffset])
Variable Description
locatorString Locator path of the sought object. STRING.
direction Indicate the search direction where the object should be. SCROLLDIRECTION.
repetitions Optional.Maximum number of times the drag/swipe screen and find object operations will be executed, before an ObjectNotFoundException is thrown. INTEGER.
dragDistance Optional.Set the drag distance in pixels. This indicates the length of the drag-gestures which will be performed during the search (how many pixels the scroll view will be dragged in the indicated direction on each repetition). INTEGER.
startPositionOffset Optional.Set an offset for the draw start point to avoid touching undesired objects and elements. POINT.