mil.dod.th.ose.gui.integration/src/mil/dod/th/ose/gui/integration/helpers/MissionSetupHelper.java
public static WebElement retrieveMissionByName(final WebDriver driver, final String missionName)
    {
        WebDriverWait wait = new WebDriverWait(driver, 5);
        wait.until(ExpectedConditions.presenceOfElementLocated(By.cssSelector("div[id='wizForm:missionGrid']")));
        
        WebElement topPaginator = driver.findElement(By.cssSelector("div[id*='missionGrid_paginator_top']"));
        int index = 0;
        int numPages = topPaginator.findElements(By.cssSelector("span[class*='ui-paginator-page']")).size();
        do
        {
            WebElement missionGrid = driver.findElement(By.cssSelector("div[id='wizForm:missionGrid_content']"));
            WebElement desiredMission = searchMissionPanel(missionGrid.findElements(
                    By.cssSelector("div[id$='missionPanel']")), missionName);
            
            if (desiredMission != null)
            {
                return desiredMission;   
            }
            
            topPaginator = driver.findElement(By.cssSelector("div[id*='missionGrid_paginator_top']"));
            List<WebElement> pageButtons = 
                    topPaginator.findElements(By.cssSelector("span[class*='ui-paginator-page ui-state-default']"));
            index ++;
            changePage(driver, pageButtons, index + 1);
            
        } while (index < numPages);
        return null;
    }
/**
     * Method that retrieves the WebElement that represents the specified mission template. 
     * Returns null if the mission cannot be found.
     * 
     * @param driver
     *          {@link WebDriver} performing the test.
     * @param missionName
     *          Name of the mission to be retrieved.
     * @return
     *          {@link WebElement} that represents the mission or null if it cannot be found.
     */
Method that retrieves the WebElement that represents the specified mission template.
Returns null if the mission cannot be found.

@param driver
WebDriver performing the test.
@param missionName
Name of the mission to be retrieved.
@return
WebElement that represents the mission or null if it cannot be found.
Method that retrieves the WebElement that represents the specified mission template . Returns null if the mission cannot be found . @param driver WebDriver performing the test . @param missionName Name of the mission to be retrieved . @return WebElement that represents the mission or null if it cannot be found .
public static WebElement retrieveMissionByName(final WebDriver driver, final String missionName)
    {
        WebDriverWait wait = new WebDriverWait(driver, 5);
        wait.until(ExpectedConditions.presenceOfElementLocated(By.cssSelector("div[id='wizForm:missionGrid']")));
        WebElement topPaginator = driver.findElement(By.cssSelector("div[id*='missionGrid_paginator_top']"));
        int index = 0;
        int numPages = topPaginator.findElements(By.cssSelector("span[class*='ui-paginator-page']")).size();
        do
        {
            WebElement missionGrid = driver.findElement(By.cssSelector("div[id='wizForm:missionGrid_content']"));
            WebElement desiredMission = searchMissionPanel(missionGrid.findElements(
                    By.cssSelector("div[id$='missionPanel']")), missionName);
            if (desiredMission != null)
            {
                return desiredMission;   
            }
            topPaginator = driver.findElement(By.cssSelector("div[id*='missionGrid_paginator_top']"));
            List<WebElement> pageButtons = 
                    topPaginator.findElements(By.cssSelector("span[class*='ui-paginator-page ui-state-default']"));
            index ++;
            changePage(driver, pageButtons, index + 1);
        } while (index < numPages);
        return null;
    }
public static WebElement retrieveMissionByName ( final WebDriver driver , final String missionName ) { WebDriverWait wait = new WebDriverWait ( driver , 5 ) ; wait . until ( ExpectedConditions . presenceOfElementLocated ( By . cssSelector ( "div[id='wizForm:missionGrid']" ) ) ) ; WebElement topPaginator = driver . findElement ( By . cssSelector ( "div[id*='missionGrid_paginator_top']" ) ) ; int index = 0 ; int numPages = topPaginator . findElements ( By . cssSelector ( "span[class*='ui-paginator-page']" ) ) . size ( ) ; do { WebElement missionGrid = driver . findElement ( By . cssSelector ( "div[id='wizForm:missionGrid_content']" ) ) ; WebElement desiredMission = searchMissionPanel ( missionGrid . findElements ( By . cssSelector ( "div[id$='missionPanel']" ) ) , missionName ) ; if ( desiredMission != null ) { return desiredMission ; } topPaginator = driver . findElement ( By . cssSelector ( "div[id*='missionGrid_paginator_top']" ) ) ; List < WebElement > pageButtons = topPaginator . findElements ( By . cssSelector ( "span[class*='ui-paginator-page ui-state-default']" ) ) ; index ++ ; changePage ( driver , pageButtons , index + 1 ) ; } while ( index < numPages ) ; return null ; }
Method that retrieves the WebElement that represents the specified mission template.
Method that retrieves the WebElement that represents the specified mission template .