Skip to content
Shauvik Roy Choudhary edited this page Jul 20, 2015 · 1 revision

Crema provides the following Fetchers as view actions to get interesting information from your app.

TextFetcher

TextFetcher tf = new TextFetcher();
onView(withId(R.id.textView)).perform(tf);
String HEADLINE = tf.getText();

ViewTreeFetcher

ViewTreeFetcher vtf = new ViewTreeFetcher();
onView(isRoot()).perform(vtf);
Log.d("View Hierarchy:\n", vtf.getViewTree());

Clone this wiki locally