1
Guys I’m trying to click to confirm my action on an instrumented test, but I’m having a problem that I haven’t found out yet anyone can help me? I’m trying the following:
fun clickPositiveButton(title: String) {
checkIsDialogDisplayed(title)
onView(withId(android.R.id.button1)).perform(click())
}
fun checkIsDialogDisplayed(title: String) {
onView(withText(title))
.inRoot(isDialog())
.check(matches(isDisplayed()))
}
Trying to make that click I’m getting this error:
androidx.test.espresso.PerformException: Error performing 'single click - At Coordinates: 894, 1004 and precision: 16, 16' on view 'with id: android:id/button1'.