Click by bounds / coordinates
Espresso has the GeneralClickAction, this is the underlying implementation of ViewActions click(), doubleClick(), and longClick(). The GeneralClickAction‘s constructor takes a CoordinatesProvider as second argument. So the basic idea is to create a static ViewAction getter which provides a custom CoordinatesProvider. Something like this: public static ViewAction clickXY(final int x, final int y){ return new GeneralClickAction( … Read more