mil.dod.th.ose.gui.integration/src/mil/dod/th/ose/gui/integration/helpers/MissionHelper.java
public static WebElement findCorrectRunningMissionCard(final WebDriver driver, final String missionName)
    {
        WebDriverWait wait = new WebDriverWait(driver, 10);
        wait.until(ExpectedConditions.presenceOfElementLocated(By.cssSelector("table[class='ui-datagrid-data']")));
        
        List<WebElement> allMissionCards = driver.findElements(By.cssSelector(
                "div[id*='missionPanel'][class*='ui-panel ui-widget']"));
        
        for (WebElement missionCard : allMissionCards)
        {
            WebElement missionNameHeader = missionCard.findElement(By.cssSelector("span[id*='mName']"));
            
            if (missionNameHeader.getText().equals(missionName))
            {
                return missionCard;
            }
        }
        
        return null;
    }
/**
     * Function searches through the displayed missions for the correct mission card and returns that 
     * WebElement. If the mission cannot be found, then null will be returned.
     * @param driver
     *  the webdriver that is to be used
     * @param missionName
     *  the name of the mission that should be used to find the correct card
     * @return
     *  the webelement that contains the information for the mission specified by the mission name if found.
     *  returns false otherwise.
     */
Function searches through the displayed missions for the correct mission card and returns that
WebElement. If the mission cannot be found, then null will be returned.
@param driver
the webdriver that is to be used
@param missionName
the name of the mission that should be used to find the correct card
@return
the webelement that contains the information for the mission specified by the mission name if found.
returns false otherwise.
Function searches through the displayed missions for the correct mission card and returns that WebElement . If the mission cannot be found then null will be returned . @param driver the webdriver that is to be used @param missionName the name of the mission that should be used to find the correct card @return the webelement that contains the information for the mission specified by the mission name if found . returns false otherwise .
public static WebElement findCorrectRunningMissionCard(final WebDriver driver, final String missionName)
    {
        WebDriverWait wait = new WebDriverWait(driver, 10);
        wait.until(ExpectedConditions.presenceOfElementLocated(By.cssSelector("table[class='ui-datagrid-data']")));
        List<WebElement> allMissionCards = driver.findElements(By.cssSelector(
                "div[id*='missionPanel'][class*='ui-panel ui-widget']"));
        for (WebElement missionCard : allMissionCards)
        {
            WebElement missionNameHeader = missionCard.findElement(By.cssSelector("span[id*='mName']"));
            if (missionNameHeader.getText().equals(missionName))
            {
                return missionCard;
            }
        }
        return null;
    }
public static WebElement findCorrectRunningMissionCard ( final WebDriver driver , final String missionName ) { WebDriverWait wait = new WebDriverWait ( driver , 10 ) ; wait . until ( ExpectedConditions . presenceOfElementLocated ( By . cssSelector ( "table[class='ui-datagrid-data']" ) ) ) ; List < WebElement > allMissionCards = driver . findElements ( By . cssSelector ( "div[id*='missionPanel'][class*='ui-panel ui-widget']" ) ) ; for ( WebElement missionCard : allMissionCards ) { WebElement missionNameHeader = missionCard . findElement ( By . cssSelector ( "span[id*='mName']" ) ) ; if ( missionNameHeader . getText ( ) . equals ( missionName ) ) { return missionCard ; } } return null ; }
Function searches through the displayed missions for the correct mission card and returns that
 WebElement.
Function searches through the displayed missions for the correct mission card and returns that WebElement .