Android: Espresso, No views in hierarchy found matching

The espresso withText method match that all the string is equal.

In your case you need to match if the string ends with your string.

Your code should be this:

onView(withText(endsWith("photo de profil"))).check(matches(isDisplayed()));

Here you have more examples: http://qathread.blogspot.com.br/2014/01/discovering-espresso-for-android.html

Leave a Comment