espresso-test-lib/EspressoInstrumentation/src/com/tomtom/espresso/test/CucumberHelperTestSteps.java
public static void checkViewWithTextIsCompletelyDisplayedOnce(final String text) {
        try {
            onView(withText(text)).check(matches(isCompletelyDisplayed()));
        } catch (final junit.framework.AssertionFailedError e) {
            // When item to check has to be asynchronously loaded in UI from adapter
            onData(hasToString(equalToIgnoringCase(text))).check(matches(isCompletelyDisplayed()));
        } catch (final NoMatchingViewException e) {
            // When item to check has to be asynchronously loaded in UI from adapter
            onData(hasToString(equalToIgnoringCase(text))).check(matches(isCompletelyDisplayed()));
        } catch (final RuntimeException e) {
            // When item to check has to be asynchronously loaded in UI from adapter
            onData(hasToString(equalToIgnoringCase(text))).check(matches(isCompletelyDisplayed()));
        }
    }
/**
     * Test if a view with some text is displayed or try to load it from adapter
     *
     * @param text
     *            Text contained in the view to test
     */
Test if a view with some text is displayed or try to load it from adapter
@param text
Text contained in the view to test
Test if a view with some text is displayed or try to load it from adapter @param text Text contained in the view to test
public static void checkViewWithTextIsCompletelyDisplayedOnce(final String text) {
        try {
            onView(withText(text)).check(matches(isCompletelyDisplayed()));
        } catch (final junit.framework.AssertionFailedError e) {
            onData(hasToString(equalToIgnoringCase(text))).check(matches(isCompletelyDisplayed()));
        } catch (final NoMatchingViewException e) {
            onData(hasToString(equalToIgnoringCase(text))).check(matches(isCompletelyDisplayed()));
        } catch (final RuntimeException e) {
            onData(hasToString(equalToIgnoringCase(text))).check(matches(isCompletelyDisplayed()));
        }
    }
public static void checkViewWithTextIsCompletelyDisplayedOnce ( final String text ) { try { onView ( withText ( text ) ) . check ( matches ( isCompletelyDisplayed ( ) ) ) ; } catch ( final junit . framework . AssertionFailedError e ) { onData ( hasToString ( equalToIgnoringCase ( text ) ) ) . check ( matches ( isCompletelyDisplayed ( ) ) ) ; } catch ( final NoMatchingViewException e ) { onData ( hasToString ( equalToIgnoringCase ( text ) ) ) . check ( matches ( isCompletelyDisplayed ( ) ) ) ; } catch ( final RuntimeException e ) { onData ( hasToString ( equalToIgnoringCase ( text ) ) ) . check ( matches ( isCompletelyDisplayed ( ) ) ) ; } }
Test if a view with some text is displayed or try to load it from adapter
 @param text
            Text contained in the view to test
Test if a view with some text is displayed or try to load it from adapter @param text Text contained in the view to test
// When item to check has to be asynchronously loaded in UI from adapter // When item to check has to be asynchronously loaded in UI from adapter // When item to check has to be asynchronously loaded in UI from adapter