title: Espresso - check if the TextView exists in the ListView
body: <p>I want to check displaying of <strong>Save €XX</strong> in the list. <strong>Save €XX</strong> is a TextView that can be <code>VISIBLE</code> or <code>INVISIBLE</code>. I use JUnit 4 and Espresso 2.2.1.</p>
  
  <p>I tried to check it like this:</p>
  
  <pre><code>onView(withText(startsWith("Save"))).check(matches(isDisplayed()));
  </code></pre>
  
  <p>but always get an error:</p>
  
  <pre><code>android.support.test.espresso.AmbiguousViewMatcherException: 'with text: a string starting with "Save"' matches multiple views in the hierarchy.
  </code></pre>
  
  <p>Is there a way to if the TextView exists in the ListView with Espresso?</p>
  
  <p><strong>UPDATE</strong></p>
  
  <p>I also tried to use <code>onData</code>:</p>
  
  <pre><code>onData(hasToString(startsWith("Save")))
                  .inAdapterView(withId(R.id.suggestion_list_view)).atPosition(0)
                  .check(matches(isDisplayed()));
  </code></pre>
  
  <p>but it seems that <code>onData</code> works with data layer but not the view layer. Therefore, I receive the error:</p>
  
  <pre><code>java.lang.RuntimeException: No data found matching: with toString() a string starting with "Save" contained values: &lt;[Data: ...]&gt;
  </code></pre>
  
  <p><a href="https://i.stack.imgur.com/Oakkc.png" rel="noreferrer"><img src="https://i.stack.imgur.com/Oakkc.png" alt="enter image description here"></a></p>