mil.dod.th.ose.gui.integration/src/mil/dod/th/ose/gui/integration/helpers/ChannelsHelper.java
public static void removeSocketChannel(final WebDriver driver, final String controllerId, 
            final String controllerName, final String host, final String port, 
            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> socketRows = retrieveChannelsList(driver, SOCKET_TABLE_SELECTOR);
        boolean found = false;
        
        for(WebElement row: socketRows)
        {
            List<WebElement> rowCells = row.findElements(By.tagName("td"));
            
            if (!channelRowContainsProperty(rowCells, controllerName + " - " + controllerId))
            {
                continue;
            }
            if (!channelRowContainsProperty(rowCells, host))
            {
                continue;
            }
            if (!channelRowContainsProperty(rowCells, port))
            {
                continue;
            }
            
            WebElement removeButton = row.findElement(By.cssSelector("button[id*='removeSocketButton']"));
            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(String.format("Unable to find [%s - %s], host=[%s] port=[%s]", 
                controllerName, controllerId, host, port), found, is(true));
    }
/**
     * Removes a specified socket based on the controller name and id and the specified host
     * name and port. Assumes currently on the channels page.
     * 
     * 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 host
     *  the host name of the socket to be removed
     * @param port
     *  the port of the socket to be removed
     * @param checkNoActiveControllerMsg
     *  whether to check for the No active controller growl message in addition to the channel remove message.
     */
Removes a specified socket based on the controller name and id and the specified host
name and port. Assumes currently on the channels page.

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


Removes a specified socket based on the controller name and id and the specified host name and port . Assumes currently on the channels page . Will wait for the channel removed message and optionally the no active controller message .
public static void removeSocketChannel(final WebDriver driver, final String controllerId, 
            final String controllerName, final String host, final String port, 
            final boolean checkNoActiveControllerMsg) throws InterruptedException, ExecutionException, TimeoutException
    {
        NavigationHelper.pageAndTabCheck(driver, NavigationButtonNameConstants.NAVBUT_PROP_CHANNELS, null);
        List<WebElement> socketRows = retrieveChannelsList(driver, SOCKET_TABLE_SELECTOR);
        boolean found = false;
        for(WebElement row: socketRows)
        {
            List<WebElement> rowCells = row.findElements(By.tagName("td"));
            if (!channelRowContainsProperty(rowCells, controllerName + " - " + controllerId))
            {
                continue;
            }
            if (!channelRowContainsProperty(rowCells, host))
            {
                continue;
            }
            if (!channelRowContainsProperty(rowCells, port))
            {
                continue;
            }
            WebElement removeButton = row.findElement(By.cssSelector("button[id*='removeSocketButton']"));
            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(String.format("Unable to find [%s - %s], host=[%s] port=[%s]", 
                controllerName, controllerId, host, port), found, is(true));
    }
public static void removeSocketChannel ( final WebDriver driver , final String controllerId , final String controllerName , final String host , final String port , final boolean checkNoActiveControllerMsg ) throws InterruptedException , ExecutionException , TimeoutException { NavigationHelper . pageAndTabCheck ( driver , NavigationButtonNameConstants . NAVBUT_PROP_CHANNELS , null ) ; List < WebElement > socketRows = retrieveChannelsList ( driver , SOCKET_TABLE_SELECTOR ) ; boolean found = false ; for ( WebElement row : socketRows ) { List < WebElement > rowCells = row . findElements ( By . tagName ( "td" ) ) ; if ( ! channelRowContainsProperty ( rowCells , controllerName + " - " + controllerId ) ) { continue ; } if ( ! channelRowContainsProperty ( rowCells , host ) ) { continue ; } if ( ! channelRowContainsProperty ( rowCells , port ) ) { continue ; } WebElement removeButton = row . findElement ( By . cssSelector ( "button[id*='removeSocketButton']" ) ) ; 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 ( String . format ( "Unable to find [%s - %s], host=[%s] port=[%s]" , controllerName , controllerId , host , port ) , found , is ( true ) ) ; }
Removes a specified socket based on the controller name and id and the specified host
 name and port.
Removes a specified socket based on the controller name and id and the specified host name and port .
//navigate to the channels page if not already there. //Remove the controller and verify that channel removed growl message is displayed.