mil.dod.th.ose.gui.integration/src/mil/dod/th/ose/gui/integration/helpers/GeneralHelper.java
public static <T> T safeWaitUntil(ExpectedCondition<T> condition)
    {
        DebugText.pushText("Wait 10 seconds for condition [%s]", condition);
        
        try
        {
            T value = new FluentWait<WebDriver>(WebDriverFactory.retrieveWebDriver())
                .withTimeout(10, TimeUnit.SECONDS)
                .pollingEvery(1, TimeUnit.SECONDS)
                .ignoring(StaleElementReferenceException.class)
                .until(condition);
            
            return value;
        }
        finally
        {
            DebugText.popText();
        }
    }
/**
     * Convenience method to wait for the given condition (10 seconds) allowing for stale elements.
     * 
     * @param condition
     *      condition to wait for
     */
Convenience method to wait for the given condition (10 seconds) allowing for stale elements.

@param condition
condition to wait for
Convenience method to wait for the given condition ( 10 seconds ) allowing for stale elements . @param condition condition to wait for
public static <T> T safeWaitUntil(ExpectedCondition<T> condition)
    {
        DebugText.pushText("Wait 10 seconds for condition [%s]", condition);
        try
        {
            T value = new FluentWait<WebDriver>(WebDriverFactory.retrieveWebDriver())
                .withTimeout(10, TimeUnit.SECONDS)
                .pollingEvery(1, TimeUnit.SECONDS)
                .ignoring(StaleElementReferenceException.class)
                .until(condition);
            return value;
        }
        finally
        {
            DebugText.popText();
        }
    }
public static < T > T safeWaitUntil ( ExpectedCondition < T > condition ) { DebugText . pushText ( "Wait 10 seconds for condition [%s]" , condition ) ; try { T value = new FluentWait < WebDriver > ( WebDriverFactory . retrieveWebDriver ( ) ) . withTimeout ( 10 , TimeUnit . SECONDS ) . pollingEvery ( 1 , TimeUnit . SECONDS ) . ignoring ( StaleElementReferenceException . class ) . until ( condition ) ; return value ; } finally { DebugText . popText ( ) ; } }
Convenience method to wait for the given condition (10 seconds) allowing for stale elements.
Convenience method to wait for the given condition ( 10 seconds ) allowing for stale elements .