Espresso.ondata Set Inadapterview To Be Alertdialog
I have an AlertDialog that contains a list of options which is set: final AlertDialog.Builder builder = new AlertDialog.Builder(getContext()) .setTitle(args.getStri
Solution 1:
onData() with "com.android.internal.app.AlertController$RecycleListView" does work for me, note that you have typo in "RecyleListView".
Also, onData() parameter should be "dataMatcher", instanceOf() on the type used as T for ArrayAdapter (String in this case) works.
This works for me:
onData(is(instanceOf(String.class))).inAdapterView(allOf(withClassName(equalTo("com.android.internal.app.AlertController$RecycleListView")), isDisplayed())).atPosition(index).perform(click());
Post a Comment for "Espresso.ondata Set Inadapterview To Be Alertdialog"