How catch an element in Espresso using source_id with out R.id

26 views Asked by At

First I'm new in tests with Espresso. I have a xml page and one element is something like that:

<node index="3" text="" resource-id="my_table" class="ScrollView" checkable="false" checked="false" focusable="false" focused="false" long-clickable="false" password="false" selected="false" b/>

Now with Espresso i need to catch the element for testing.

Normaly I know, is used something like

allOf(withId(R.id.some_id))

But in my case the R.id.my_table doesen't workd first because my_table is a string and not Int , second because my_table is not in R.id...

How can I catch that element with resource-id="my_table" ?

Can be a solution to use withResourceName to find the matches Views?

Thanks for any help

0

There are 0 answers