Espresso test fails with NoActivityResumedException often

后端 未结 6 2106
既然无缘
既然无缘 2021-02-06 21:58

EDIT: Updated description and error message and added some images. Still have this problem.

I have a strange error that occur many times when running espresso tests. Af

6条回答
  •  孤城傲影
    2021-02-06 22:39

    In my case, the solution was to use the UI Automater

    val uiDevice = UiDevice.getInstance(InstrumentationRegistry.getInstrumentation())
    uiDevice.findObject(UiSelector().textContains("text")).click()
    

    I wanted to do clicks on an activity hosted by google login SDK. I noticed the activity triggerred by SDK is still visible even when the process of the app under test is killed. So I used UI Automator which is inteded for cross-app functional UI testing

提交回复
热议问题