public class ScrollerHelper
extends java.lang.Object
Constructor and Description |
---|
ScrollerHelper(Scroller scroller,
DroidDriver driver,
Finder containerFinder) |
Modifier and Type | Method and Description |
---|---|
boolean |
canScrollTo(Finder itemFinder)
Scrolls to
itemFinder and returns true, otherwise returns false. |
UiElement |
scrollTo(Finder itemFinder)
Scrolls
containerFinder in both directions if necessary to find
itemFinder , which is a descendant of containerFinder . |
UiElement |
scrollTo(Finder itemFinder,
Direction.PhysicalDirection direction)
Scrolls
containerFinder in direction if necessary to find
itemFinder , which is a descendant of containerFinder . |
public ScrollerHelper(Scroller scroller, DroidDriver driver, Finder containerFinder)
public UiElement scrollTo(Finder itemFinder)
containerFinder
in both directions if necessary to find
itemFinder
, which is a descendant of containerFinder
.itemFinder
- Finder for the desired item; relative to
containerFinder
itemFinder
ElementNotFoundException
- If no match is foundpublic UiElement scrollTo(Finder itemFinder, Direction.PhysicalDirection direction)
containerFinder
in direction
if necessary to find
itemFinder
, which is a descendant of containerFinder
.itemFinder
- Finder for the desired item; relative to
containerFinder
direction
- specifies where the view port will move instead of the fingeritemFinder
ElementNotFoundException
- If no match is foundpublic boolean canScrollTo(Finder itemFinder)
itemFinder
and returns true, otherwise returns false.itemFinder
- Finder for the desired item