Espresso – TextView contains String

You can use the Hamcrest library. It has a method containsString.
I believe it is in the Espresso library.

You can static import it in your class:

import static org.hamcrest.core.StringContains.containsString;

Use containsString in your method on a TextView:

textView.check(matches(withText(containsString("Test"))));

Leave a Comment

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)