Reputation: 469
I have following resource-id in UI Automator viewer, but I'm not sure how can use it in matcher when running espresso tests. Example
resource-id: com.app.cooking.debug:id/design_menu_item_text
How should I transform this id to Espresso id to make sure I can run matcher:
Espresso.onView(ViewMatchers.withId("com.app.cooking.debug:id/design_navigation_view")).check(ViewAssertions.matches(ViewMatchers.isDisplayed()))
P.S. I don't have that id in R.id.myId
Upvotes: 0
Views: 806
Reputation: 91
This should work Espresso.onView(ViewMatchers.withId(R.id.design_navigation_view)).check(ViewAssertions.matches(ViewMatchers.isDisplayed()))
Upvotes: 1