espresso-test-lib/EspressoInstrumentation/src/com/tomtom/espresso/test/CucumberHelperTestSteps.java
public static void checkViewWithTextIsCompletelyDisplayed(final String text) {
        int retries = 20;
        do {
            try {
                checkViewWithTextIsCompletelyDisplayedOnce(text);
                return;
            } catch (final junit.framework.AssertionFailedError e) {
                try { // Retry every half a second during 10 seconds
                    Thread.sleep(RETRY_WAIT);
                } catch (final InterruptedException ex) {
                }
            } catch (final NoMatchingViewException e) {
                try { // Retry every half a second during 10 seconds
                    Thread.sleep(RETRY_WAIT);
                } catch (final InterruptedException ex) {
                }
            } catch (final RuntimeException e) {
                try { // Retry every half a second during 10 seconds
                    Thread.sleep(RETRY_WAIT);
                } catch (final InterruptedException ex) {
                }
            }
        } while (--retries > 0);
        checkViewWithTextIsCompletelyDisplayedOnce(text);
    }
/**
     * Test if some view is displayed and retry for 10 seconds in case it's asynchronously loaded
     *
     * @param text
     *            Text contained in the view to test
     */
Test if some view is displayed and retry for 10 seconds in case it's asynchronously loaded
@param text
Text contained in the view to test
Test if some view is displayed and retry for 10 seconds in case it ' s asynchronously loaded @param text Text contained in the view to test
public static void checkViewWithTextIsCompletelyDisplayed(final String text) {
        int retries = 20;
        do {
            try {
                checkViewWithTextIsCompletelyDisplayedOnce(text);
                return;
            } catch (final junit.framework.AssertionFailedError e) {
                try { 
                    Thread.sleep(RETRY_WAIT);
                } catch (final InterruptedException ex) {
                }
            } catch (final NoMatchingViewException e) {
                try { 
                    Thread.sleep(RETRY_WAIT);
                } catch (final InterruptedException ex) {
                }
            } catch (final RuntimeException e) {
                try { 
                    Thread.sleep(RETRY_WAIT);
                } catch (final InterruptedException ex) {
                }
            }
        } while (--retries > 0);
        checkViewWithTextIsCompletelyDisplayedOnce(text);
    }
public static void checkViewWithTextIsCompletelyDisplayed ( final String text ) { int retries = 20 ; do { try { checkViewWithTextIsCompletelyDisplayedOnce ( text ) ; return ; } catch ( final junit . framework . AssertionFailedError e ) { try { Thread . sleep ( RETRY_WAIT ) ; } catch ( final InterruptedException ex ) { } } catch ( final NoMatchingViewException e ) { try { Thread . sleep ( RETRY_WAIT ) ; } catch ( final InterruptedException ex ) { } } catch ( final RuntimeException e ) { try { Thread . sleep ( RETRY_WAIT ) ; } catch ( final InterruptedException ex ) { } } } while ( -- retries > 0 ) ; checkViewWithTextIsCompletelyDisplayedOnce ( text ) ; }
Test if some view is displayed and retry for 10 seconds in case it's asynchronously loaded
 @param text
            Text contained in the view to test
Test if some view is displayed and retry for 10 seconds in case it ' s asynchronously loaded @param text Text contained in the view to test
// Retry every half a second during 10 seconds // Retry every half a second during 10 seconds // Retry every half a second during 10 seconds