mirror of
https://github.com/appium/appium.git
synced 2026-05-02 16:30:57 -05:00
Android: Added support for 'direction' to scrollTo.
This fix adds a new option (direction) to 'mobile: scrollTo'. If 'horizontal' is provided (or if the view is a HorizontalScrollView), we will call setAsHorizontalList() before commencing the scroll.
This commit is contained in:
@@ -545,12 +545,13 @@ androidController.drag = function (startX, startY, endX, endY, duration, touchCo
|
||||
}
|
||||
};
|
||||
|
||||
androidController.scrollTo = function (elementId, text, cb) {
|
||||
androidController.scrollTo = function (elementId, text, direction, cb) {
|
||||
// instead of the elementId as the element to be scrolled too,
|
||||
// it's the scrollable view to swipe until the uiobject that has the
|
||||
// text is found.
|
||||
var opts = {
|
||||
text: text
|
||||
, direction: direction
|
||||
, elementId: elementId
|
||||
};
|
||||
this.proxy(["element:scrollTo", opts], cb);
|
||||
|
||||
Reference in New Issue
Block a user