Android Espresso: Make assertion while button is kept pressed
问题 I'm quite new to Espresso on Android and I am running into the following problem: I want Espresso to perform a longclick(or something..) on a button, and while the button is kept pressed down, I want to check the state of a different View. In (more or less) pseudocode: onView(withId(button_id)).perform(pressButtonDown()); onView(withId(textBox_id)).check(matches(withText("Button is pressed"))); onView(withId(button_id)).perform(releaseButton()); I tried writing 2 custom Taps, PRESS and