mil.dod.th.ose.gui.integration/src/mil/dod/th/ose/gui/integration/helpers/ChannelsHelper.java
public static void removeTransportChannel(final WebDriver driver, final String controllerId, 
            final String controllerName, final String transportName, final String localAdress, 
            final String remoteAddress, final boolean checkNoActiveControllerMsg) throws InterruptedException, 
            ExecutionException, TimeoutException
    {
        //navigate to the channels page if not already there.
        NavigationHelper.pageAndTabCheck(driver, NavigationButtonNameConstants.NAVBUT_PROP_CHANNELS, null);

        List<WebElement> transportRows = retrieveChannelsList(driver, TRANSPORT_TABLE_SELECTOR);
        boolean found = false;
        
        for(WebElement row: transportRows)
        {
            List<WebElement> rowCells = row.findElements(By.tagName("td"));
            
            if (!channelRowContainsProperty(rowCells, controllerName + " - " + controllerId))
            {
                continue;
            }
            if (!channelRowContainsProperty(rowCells, transportName))
            {
                continue;
            }
            if (!channelRowContainsProperty(rowCells, localAdress))
            {
                continue;
            }
            if (!channelRowContainsProperty(rowCells, remoteAddress))
            {
                continue;
            }
            
            WebElement removeButton = row.findElement(By.cssSelector("button[id*='removeTransportButton']"));
            assertThat(removeButton, is(notNullValue()));
            
            //Remove the controller and verify that channel removed growl message is displayed.
            String[] growlTitles;
            if (checkNoActiveControllerMsg)
            {
                growlTitles = new String[]{"Channel Removed", "No active controller"};
            }
            else
            {
                growlTitles = new String[]{"Channel Removed"};
            }
            GrowlVerifier.verifyAndWaitToDisappear(20, removeButton, growlTitles);
            found = true;
            break;
        }
        
        assertThat(found, is(true));
    }
/**
     * Method that removes a transport channel.
     * 
     * Will wait for the channel removed message and optionally the no active controller message.
     * 
     * @param driver
     *  the web driver performing the test
     * @param controllerId
     *  the string hex representation of the controller id
     * @param controllerName
     *  the name of the controller
     * @param transportName
     *  the name of the transport layer of transport channel to be removed
     * @param localAdress
     *  the local address of the transport channel to be removed
     * @param remoteAddress
     *  the remote address of the transport channel to be removed
     * @param checkNoActiveControllerMsg
     *  whether to check for the No active controller growl message in addition to the channel remove message.
     */
Method that removes a transport channel.

Will wait for the channel removed message and optionally the no active controller message.


Method that removes a transport channel . Will wait for the channel removed message and optionally the no active controller message .
public static void removeTransportChannel(final WebDriver driver, final String controllerId, 
            final String controllerName, final String transportName, final String localAdress, 
            final String remoteAddress, final boolean checkNoActiveControllerMsg) throws InterruptedException, 
            ExecutionException, TimeoutException
    {
        NavigationHelper.pageAndTabCheck(driver, NavigationButtonNameConstants.NAVBUT_PROP_CHANNELS, null);
        List<WebElement> transportRows = retrieveChannelsList(driver, TRANSPORT_TABLE_SELECTOR);
        boolean found = false;
        for(WebElement row: transportRows)
        {
            List<WebElement> rowCells = row.findElements(By.tagName("td"));
            if (!channelRowContainsProperty(rowCells, controllerName + " - " + controllerId))
            {
                continue;
            }
            if (!channelRowContainsProperty(rowCells, transportName))
            {
                continue;
            }
            if (!channelRowContainsProperty(rowCells, localAdress))
            {
                continue;
            }
            if (!channelRowContainsProperty(rowCells, remoteAddress))
            {
                continue;
            }
            WebElement removeButton = row.findElement(By.cssSelector("button[id*='removeTransportButton']"));
            assertThat(removeButton, is(notNullValue()));
            String[] growlTitles;
            if (checkNoActiveControllerMsg)
            {
                growlTitles = new String[]{"Channel Removed", "No active controller"};
            }
            else
            {
                growlTitles = new String[]{"Channel Removed"};
            }
            GrowlVerifier.verifyAndWaitToDisappear(20, removeButton, growlTitles);
            found = true;
            break;
        }
        assertThat(found, is(true));
    }
public static void removeTransportChannel ( final WebDriver driver , final String controllerId , final String controllerName , final String transportName , final String localAdress , final String remoteAddress , final boolean checkNoActiveControllerMsg ) throws InterruptedException , ExecutionException , TimeoutException { NavigationHelper . pageAndTabCheck ( driver , NavigationButtonNameConstants . NAVBUT_PROP_CHANNELS , null ) ; List < WebElement > transportRows = retrieveChannelsList ( driver , TRANSPORT_TABLE_SELECTOR ) ; boolean found = false ; for ( WebElement row : transportRows ) { List < WebElement > rowCells = row . findElements ( By . tagName ( "td" ) ) ; if ( ! channelRowContainsProperty ( rowCells , controllerName + " - " + controllerId ) ) { continue ; } if ( ! channelRowContainsProperty ( rowCells , transportName ) ) { continue ; } if ( ! channelRowContainsProperty ( rowCells , localAdress ) ) { continue ; } if ( ! channelRowContainsProperty ( rowCells , remoteAddress ) ) { continue ; } WebElement removeButton = row . findElement ( By . cssSelector ( "button[id*='removeTransportButton']" ) ) ; assertThat ( removeButton , is ( notNullValue ( ) ) ) ; String [ ] growlTitles ; if ( checkNoActiveControllerMsg ) { growlTitles = new String [ ] { "Channel Removed" , "No active controller" } ; } else { growlTitles = new String [ ] { "Channel Removed" } ; } GrowlVerifier . verifyAndWaitToDisappear ( 20 , removeButton , growlTitles ) ; found = true ; break ; } assertThat ( found , is ( true ) ) ; }
Method that removes a transport channel.
Method that removes a transport channel .
//navigate to the channels page if not already there. //Remove the controller and verify that channel removed growl message is displayed.