I have a custom ImageButton
that is not fully visible, by design, so when I perform a click action I get this error:
android.support.test.espresso.P
Default click of Espresso is requiring visibility of view > 90%
. What do you think about creating an own click
ViewAction?
Like this...
public final class MyViewActions {
public static ViewAction click() {
return new GeneralClickAction(SafeTap.SINGLE, GeneralLocation.CENTER, Press.FINGER);
}
}
This click will click on the center of your view.
Then you could execute click like this:
onView(withId(....)).perform(MyViewActions.click());
I hope it could work.