I am new to Espresso and Mobile Testing, and I am facing a challenge. I have to search for a contact in App and click on contact displayed at second position.
I checked many posts which were similar but however none of those worked for my example.
Code to Search : onView(withId(R.id.textSearch)).perform(typeText("pa"));
Code to Select : onView(withText("Parth Vyas")).perform(click());
But here if I want to select any element which is displayed at position 2, how can I do that?