matches(not(isDisplayed())) fails with NoMatchingViewException

前端 未结 5 636
既然无缘
既然无缘 2020-12-25 09:25

I am trying to test the absence of the UI view. The view selector is as follows:

public static ViewInteraction onMyTestUi() {
    return onView(withId(R.id.m         


        
5条回答
  •  粉色の甜心
    2020-12-25 09:48

    Also work with yours method, but something like this:

    onView(withId(R.id.next)).check(matches(not(isDisplayed())));
    

提交回复
热议问题