Я пытался найти представление и пробовал разные комбинации, но мой лог c выглядит правильно по всем примерам stackoverflow.
Мой код:
onData(anything()).inAdapterView(
instanceOf(ListView::class.java))
.atPosition(0)
.onChildView(withId(android.R.id.title))
.check(matches(withText("Edit")))
.check(matches(isDisplayed()))
И выдает ошибку :
E/TestRunner: androidx.test.espresso.NoMatchingViewException: No views in hierarchy found matching: (with id: android:id/title and is descendant of a: displaying data matching: ANYTHING within adapter view matching: an instance of android.widget.ListView)
If the target view is not part of the view hierarchy, you may need to use Espresso.onData to load it from one of the following AdapterViews:androidx.appcompat.widget.MenuPopupWindow$MenuDropDownListView{3df3337 VFED.VC.. ........ 0,0-539,264}
Есть идеи, что я делаю не так? ![enter image description here](https://i.stack.imgur.com/uwqec.png)