I have a custom View
class public class Foo extends RelativeLayout{...}
which have an EditText
in it. The Foo
class have a XML layout inflated and its EditText
also have an id but its not able to find the EditText
I'm using this Espresso code:
onView(allOf(withId(R.id.edittext), withParent(withId(R.id.name_container)))).check(matches(isDisplayed())).perform(click());
And the error message I get is:
android.support.test.espresso.NoMatchingViewException: No views in hierarchy found matching: (with id: dk.aura.app.staging:id/edittext and has parent matching: with id: dk.aura.app.staging:id/name_container)