RunTimeException in Android espresso when selecting spinner in dialog

前端 未结 4 677
Happy的楠姐
Happy的楠姐 2021-01-12 03:14

I have an activity where some dialog is openend. On this dialog there is a spinner. I want to select a specific value in this spinner, but I get following exception:

4条回答
  •  轻奢々
    轻奢々 (楼主)
    2021-01-12 03:54

    Try this:

    onData(allOf(is(instanceOf(String.class)), is(value)))
        .inRoot(isPlatformPopup()).perform(click());
    

提交回复
热议问题