public class StaticSentinelStrategy extends SentinelStrategy
UiElement.getChildren(io.appium.droiddriver.finders.Predicate<? super io.appium.droiddriver.UiElement>)
includes all children
no matter if it is visible. Currently InstrumentationDriver
behaves
this way.
This does not work if a child is larger than the physical size of the container.
SentinelStrategy.Getter, SentinelStrategy.MorePredicateGetter
Modifier and Type | Field and Description |
---|---|
static StaticSentinelStrategy |
DEFAULT
Defaults to FIRST_CHILD_GETTER for backward scrolling, LAST_CHILD_GETTER
for forward scrolling, and the standard
Direction.DirectionConverter . |
FIRST_CHILD_GETTER, LAST_CHILD_GETTER, SECOND_CHILD_GETTER, SECOND_LAST_CHILD_GETTER
Constructor and Description |
---|
StaticSentinelStrategy(SentinelStrategy.Getter backwardGetter,
SentinelStrategy.Getter forwardGetter,
Direction.DirectionConverter directionConverter) |
Modifier and Type | Method and Description |
---|---|
boolean |
scroll(DroidDriver driver,
Finder containerFinder,
Direction.PhysicalDirection direction)
Tries to scroll
containerFinder in direction . |
beginScrolling, doScroll, endScrolling, getDirectionConverter, getSentinel, toString
public static final StaticSentinelStrategy DEFAULT
Direction.DirectionConverter
.public StaticSentinelStrategy(SentinelStrategy.Getter backwardGetter, SentinelStrategy.Getter forwardGetter, Direction.DirectionConverter directionConverter)
public boolean scroll(DroidDriver driver, Finder containerFinder, Direction.PhysicalDirection direction)
ScrollStepStrategy
containerFinder
in direction
. Returns whether scrolling is
effective.driver
- a DroidDriver instancecontainerFinder
- Finder for the container that can scroll, for instance a ListViewdirection
- specifies where the view port will move instead of the finger