mil.dod.th.ose.gui.integration/src/mil/dod/th/ose/gui/integration/helpers/MissionSetupHelper.java
private static void changePage(final WebDriver driver, final List<WebElement> pages, final int desiredPage)
    {
        Wait<WebDriver> fwait = new FluentWait<WebDriver>(driver).withTimeout(30, TimeUnit.SECONDS).
                pollingEvery(1, TimeUnit.SECONDS).ignoring(NoSuchElementException.class, 
                        StaleElementReferenceException.class);
        
        pages.get(desiredPage - 1).click();
        
        Boolean result = fwait.until(new ExpectedCondition<Boolean>()
        {
            @Override
            public Boolean apply(WebDriver driver)
            {
                WebElement activePage = driver.findElement(By.cssSelector("span[class='ui-paginator-page " +
                        "ui-state-default ui-corner-all ui-state-active']"));
                return Integer.valueOf(activePage.getText()) == desiredPage;
            }
        });
        assertThat(result, is(true));
    }
/**
     * Method that navigates to the specified page of the mission selection grid on the mission setup page.
     * 
     * @param driver
     *          {@link WebDriver} performing the test.
     * @param pages
     *          List of page elements. List is 1-based value (not a 0 based index)
     * @param desiredPage
     *          Integer that represents the page to be navigated to.
     */
Method that navigates to the specified page of the mission selection grid on the mission setup page.

@param driver
WebDriver performing the test.
@param pages
List of page elements. List is 1-based value (not a 0 based index)
@param desiredPage
Integer that represents the page to be navigated to.
Method that navigates to the specified page of the mission selection grid on the mission setup page . @param driver WebDriver performing the test . @param pages List of page elements . List is 1 - based value ( not a 0 based index ) @param desiredPage Integer that represents the page to be navigated to .
private static void changePage(final WebDriver driver, final List<WebElement> pages, final int desiredPage)
    {
        Wait<WebDriver> fwait = new FluentWait<WebDriver>(driver).withTimeout(30, TimeUnit.SECONDS).
                pollingEvery(1, TimeUnit.SECONDS).ignoring(NoSuchElementException.class, 
                        StaleElementReferenceException.class);
        pages.get(desiredPage - 1).click();
        Boolean result = fwait.until(new ExpectedCondition<Boolean>()
        {
            @Override
            public Boolean apply(WebDriver driver)
            {
                WebElement activePage = driver.findElement(By.cssSelector("span[class='ui-paginator-page " +
                        "ui-state-default ui-corner-all ui-state-active']"));
                return Integer.valueOf(activePage.getText()) == desiredPage;
            }
        });
        assertThat(result, is(true));
    }
private static void changePage ( final WebDriver driver , final List < WebElement > pages , final int desiredPage ) { Wait < WebDriver > fwait = new FluentWait < WebDriver > ( driver ) . withTimeout ( 30 , TimeUnit . SECONDS ) . pollingEvery ( 1 , TimeUnit . SECONDS ) . ignoring ( NoSuchElementException . class , StaleElementReferenceException . class ) ; pages . get ( desiredPage - 1 ) . click ( ) ; Boolean result = fwait . until ( new ExpectedCondition < Boolean > ( ) { @ Override public Boolean apply ( WebDriver driver ) { WebElement activePage = driver . findElement ( By . cssSelector ( "span[class='ui-paginator-page " + "ui-state-default ui-corner-all ui-state-active']" ) ) ; return Integer . valueOf ( activePage . getText ( ) ) == desiredPage ; } } ) ; assertThat ( result , is ( true ) ) ; }
Method that navigates to the specified page of the mission selection grid on the mission setup page.
Method that navigates to the specified page of the mission selection grid on the mission setup page .