mil.dod.th.ose.gui.integration/src/mil/dod/th/ose/gui/integration/webapp/mp/TestLoadSelectedMission.java
@Test
    public void testSelectedMissionNoController() throws InterruptedException, ExecutionException, TimeoutException
    {
        NavigationHelper.navigateToPage(m_Driver, NavigationButtonNameConstants.NAVBUT_PROP_CHANNELS);
        ChannelsHelper.removeSocketChannel(m_Driver, "localhost", "4000", true);
        
        MissionSetupHelper.createMissionSetupWithTestMission(m_Driver, false, false);

        //Wait needed to assure that the elements for the tab has loaded.
        WebDriverWait wait = new WebDriverWait(m_Driver, 5);
        wait.until(ExpectedConditions.presenceOfElementLocated(By.xpath("//button[contains(@id, 'loadMission')]")));

        //Selects the table which displays the parameters for the mission and then creates a list of the rows within
        //the table.
        WebElement parametersTable = m_Driver.findElement(By.cssSelector("div[class='ui-datatable-scrollable-body']"));
        List<WebElement> tableRows = parametersTable.findElements(By.tagName("tr"));
        assertThat(tableRows.size(), is(4));

        //Select and click the load mission button
        WebElement loadMissionButton = m_Driver.findElement(By.xpath("//button[contains(@id, 'loadMission')]"));
        assertThat(loadMissionButton, is(notNullValue()));
        loadMissionButton.click();
        
        //Wait needed to insure the unable to load dialog has opened.
        wait.until(ExpectedConditions.visibilityOfElementLocated(By.xpath("//div[contains(@id, 'unableLoadDlg')]")));
        
        //Select and click unable to load dialog
        WebElement closeDialog = m_Driver.findElement(By.xpath("//button[contains(@id, 'closeDialog')]"));
        assertThat(closeDialog, is(notNullValue()));
        closeDialog.click();
        
        NavigationHelper.navigateToPage(m_Driver, NavigationButtonNameConstants.NAVBUT_PROP_CHANNELS);
        ControllerHelper.createController(m_Driver);
    }
/**
     * Setup a mission and click load mission.
     * 
     * Verify unable to load dialog is presented.
     */
Setup a mission and click load mission.

Verify unable to load dialog is presented.
Setup a mission and click load mission . Verify unable to load dialog is presented .
@Test
    public void testSelectedMissionNoController() throws InterruptedException, ExecutionException, TimeoutException
    {
        NavigationHelper.navigateToPage(m_Driver, NavigationButtonNameConstants.NAVBUT_PROP_CHANNELS);
        ChannelsHelper.removeSocketChannel(m_Driver, "localhost", "4000", true);
        MissionSetupHelper.createMissionSetupWithTestMission(m_Driver, false, false);
        WebDriverWait wait = new WebDriverWait(m_Driver, 5);
        wait.until(ExpectedConditions.presenceOfElementLocated(By.xpath("//button[contains(@id, 'loadMission')]")));
        WebElement parametersTable = m_Driver.findElement(By.cssSelector("div[class='ui-datatable-scrollable-body']"));
        List<WebElement> tableRows = parametersTable.findElements(By.tagName("tr"));
        assertThat(tableRows.size(), is(4));
        WebElement loadMissionButton = m_Driver.findElement(By.xpath("//button[contains(@id, 'loadMission')]"));
        assertThat(loadMissionButton, is(notNullValue()));
        loadMissionButton.click();
        wait.until(ExpectedConditions.visibilityOfElementLocated(By.xpath("//div[contains(@id, 'unableLoadDlg')]")));
        WebElement closeDialog = m_Driver.findElement(By.xpath("//button[contains(@id, 'closeDialog')]"));
        assertThat(closeDialog, is(notNullValue()));
        closeDialog.click();
        NavigationHelper.navigateToPage(m_Driver, NavigationButtonNameConstants.NAVBUT_PROP_CHANNELS);
        ControllerHelper.createController(m_Driver);
    }
@ Test public void testSelectedMissionNoController ( ) throws InterruptedException , ExecutionException , TimeoutException { NavigationHelper . navigateToPage ( m_Driver , NavigationButtonNameConstants . NAVBUT_PROP_CHANNELS ) ; ChannelsHelper . removeSocketChannel ( m_Driver , "localhost" , "4000" , true ) ; MissionSetupHelper . createMissionSetupWithTestMission ( m_Driver , false , false ) ; WebDriverWait wait = new WebDriverWait ( m_Driver , 5 ) ; wait . until ( ExpectedConditions . presenceOfElementLocated ( By . xpath ( "//button[contains(@id, 'loadMission')]" ) ) ) ; WebElement parametersTable = m_Driver . findElement ( By . cssSelector ( "div[class='ui-datatable-scrollable-body']" ) ) ; List < WebElement > tableRows = parametersTable . findElements ( By . tagName ( "tr" ) ) ; assertThat ( tableRows . size ( ) , is ( 4 ) ) ; WebElement loadMissionButton = m_Driver . findElement ( By . xpath ( "//button[contains(@id, 'loadMission')]" ) ) ; assertThat ( loadMissionButton , is ( notNullValue ( ) ) ) ; loadMissionButton . click ( ) ; wait . until ( ExpectedConditions . visibilityOfElementLocated ( By . xpath ( "//div[contains(@id, 'unableLoadDlg')]" ) ) ) ; WebElement closeDialog = m_Driver . findElement ( By . xpath ( "//button[contains(@id, 'closeDialog')]" ) ) ; assertThat ( closeDialog , is ( notNullValue ( ) ) ) ; closeDialog . click ( ) ; NavigationHelper . navigateToPage ( m_Driver , NavigationButtonNameConstants . NAVBUT_PROP_CHANNELS ) ; ControllerHelper . createController ( m_Driver ) ; }
Setup a mission and click load mission.
Setup a mission and click load mission .
//Wait needed to assure that the elements for the tab has loaded. //Selects the table which displays the parameters for the mission and then creates a list of the rows within //the table. //Select and click the load mission button //Wait needed to insure the unable to load dialog has opened. //Select and click unable to load dialog