So far we can do:
How can we swipeTop(all the way to the Top) or swipeBottom(all the way to the bottom) is expresso. Please give me an example if these methods already exists.
Have you tried a GeneralSwipeAction
like that?
private static ViewAction swipeFromTopToBottom() {
return new GeneralSwipeAction(Swipe.FAST, GeneralLocation.TOP_CENTER,
GeneralLocation.BOTTOM_CENTER, Press.FINGER);
}
Maybe you have to provide a custom implementation for the second and/or third parameter, as Anna already mentioned:
new CoordinatesProvider() {
@Override
public float[] calculateCoordinates(View view) {
float[] coordinates = GeneralLocation.CENTER.calculateCoordinates(view);
coordinates[1] = 0;
return coordinates;
}
}