title: Android espresso test - test if a view inside a recyclerview item is visible
body: <p>I have a RecyclerView with id '<strong>rv_list</strong>'. On clicking on any RecyclerView item, there is a View inside every item with id '<strong>star</strong>' that gets visible.</p>
  
  <p>I want to check this using expresso - 
  Click on first RecyclerView item, check if the view <strong>R.id.star</strong> is visible.</p>
  
  <p>My code is -</p>
  
  <pre><code>@Test
  fun checkIfStarVisibleOnItemClick() {
  
    onView(withId(R.id.rv_list))
              .perform(RecyclerViewActions.actionOnItemAtPosition&lt;RepositoriesAdapter.RepositoriesViewHolder&gt;(0, click()))
  
  
     onView(withId(R.id.star))
              .check(matches(isDisplayed()))
  
   }
  </code></pre>
  
  <p>I get this error - </p>
  
  <blockquote>
    <p>id/star' matches multiple views in the hierarchy</p>
  </blockquote>