mil.dod.th.ose.gui.integration/src/mil/dod/th/ose/gui/integration/helpers/observation/ObservationFilterHelper.java
public static void waitTillObsTableUpdates(final WebDriver driver, final int numOfObs, int timeoutSecs) 
        throws InterruptedException
    {
        Wait<WebDriver> fwait = new FluentWait<WebDriver>(driver).withTimeout(timeoutSecs, TimeUnit.SECONDS).
                pollingEvery(1, TimeUnit.SECONDS).ignoring(NoSuchElementException.class);
        fwait.until(new ExpectedCondition<Boolean>()
        {
            private int lastSize;
            
            @Override
            public Boolean apply(WebDriver driver)
            {
                List<WebElement> panels = driver.findElements(
                        By.cssSelector("div[id^='tabView'][id$='observationPanel']"));
                lastSize = panels.size();
                return panels.size() == numOfObs;
            }
            
            @Override
            public String toString()
            {
                return String.format("panel size expected is %d and was %d", numOfObs, lastSize);
            }
        });
    }
/**
     * Method that waits till the observation table displays a certain number of observation. Used to wait till the 
     * observation panel has been updated after clicking the retrieve observation button or a filter has been enacted.
     * 
     * @param driver
     *      {@link WebDriver} currently in use for running the tests.
     * @param numOfObs
     *      Integer that represents the number of observations that should be displayed in the observation panel after
     *      either the retrieve observations button has been clicked or a filter has been enacted.
     */
Method that waits till the observation table displays a certain number of observation. Used to wait till the
observation panel has been updated after clicking the retrieve observation button or a filter has been enacted.

@param driver
WebDriver currently in use for running the tests.
@param numOfObs
Integer that represents the number of observations that should be displayed in the observation panel after
either the retrieve observations button has been clicked or a filter has been enacted.
Method that waits till the observation table displays a certain number of observation . Used to wait till the observation panel has been updated after clicking the retrieve observation button or a filter has been enacted . @param driver WebDriver currently in use for running the tests . @param numOfObs Integer that represents the number of observations that should be displayed in the observation panel after either the retrieve observations button has been clicked or a filter has been enacted .
public static void waitTillObsTableUpdates(final WebDriver driver, final int numOfObs, int timeoutSecs) 
        throws InterruptedException
    {
        Wait<WebDriver> fwait = new FluentWait<WebDriver>(driver).withTimeout(timeoutSecs, TimeUnit.SECONDS).
                pollingEvery(1, TimeUnit.SECONDS).ignoring(NoSuchElementException.class);
        fwait.until(new ExpectedCondition<Boolean>()
        {
            private int lastSize;
            @Override
            public Boolean apply(WebDriver driver)
            {
                List<WebElement> panels = driver.findElements(
                        By.cssSelector("div[id^='tabView'][id$='observationPanel']"));
                lastSize = panels.size();
                return panels.size() == numOfObs;
            }
            @Override
            public String toString()
            {
                return String.format("panel size expected is %d and was %d", numOfObs, lastSize);
            }
        });
    }
public static void waitTillObsTableUpdates ( final WebDriver driver , final int numOfObs , int timeoutSecs ) throws InterruptedException { Wait < WebDriver > fwait = new FluentWait < WebDriver > ( driver ) . withTimeout ( timeoutSecs , TimeUnit . SECONDS ) . pollingEvery ( 1 , TimeUnit . SECONDS ) . ignoring ( NoSuchElementException . class ) ; fwait . until ( new ExpectedCondition < Boolean > ( ) { private int lastSize ; @ Override public Boolean apply ( WebDriver driver ) { List < WebElement > panels = driver . findElements ( By . cssSelector ( "div[id^='tabView'][id$='observationPanel']" ) ) ; lastSize = panels . size ( ) ; return panels . size ( ) == numOfObs ; } @ Override public String toString ( ) { return String . format ( "panel size expected is %d and was %d" , numOfObs , lastSize ) ; } } ) ; }
Method that waits till the observation table displays a certain number of observation.
Method that waits till the observation table displays a certain number of observation .