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:
Try this:
onData(allOf(is(instanceOf(String.class)), is(value))) .inRoot(isPlatformPopup()).perform(click());