mil.dod.th.ose.gui.integration/src/mil/dod/th/ose/gui/integration/helpers/BundleManagerUtil.java
public static WebElement filterBundles(WebDriver driver, String bundleSymbolicName, boolean shouldBeFound) 
            throws InterruptedException
    {
        NavigationHelper.pageAndTabCheck(driver, NavigationButtonNameConstants.NAVBUT_PROP_SYS_CONFIG, BUNDLE_TAB_ID);
        WebDriverWait wait = new WebDriverWait(driver, 5);
        wait.until(ExpectedConditions.visibilityOfElementLocated(By.cssSelector("input[id*='globalFilter']")));
        WebElement searchBar = driver.findElement(By.cssSelector("input[id*='globalFilter']"));
        
        GeneralHelper.retrySendKeys(driver, searchBar, bundleSymbolicName, 5);
        
        if (shouldBeFound)
        {
            MultipleByChain rows = waitForBundleFilter(driver, new Function<Collection<String>, Boolean>()
            {
                @Override
                public Boolean apply(Collection<String> bundleSymbolicNames)
                {
                    // wait for exactly 1 bundle being displayed
                    return bundleSymbolicNames.size() == 1;
                }
            });
            
            WebElement bundleNameCell = rows.extendChain()
                    .index(0) // first row (already confirmed index above)
                    .multiple(By.tagName("span"))
                    .index(2)
                    .build()
                    .findElement();
            
            assertThat(bundleNameCell.getText(), is("(" + bundleSymbolicName + ")"));
            
            return rows.extendChain().index(0).build().findElement();
        }
        else
        {
            waitForBundleFilter(driver, new Function<Collection<String>, Boolean>()
            {
                @Override
                public Boolean apply(Collection<String> bundleSymbolicNames)
                {
                    // wait for exactly 0 bundles
                    return bundleSymbolicNames.size() == 0;
                }
            });
            return null;
        }
    }
/**
     * Retrieves the search bar element and enters the name of the bundle to be searched for then optionally waits for 
     * that entry to be shown.
     * 
     * @param bundleSymbolicName
     *      symbolic name of the bundle being searched for 
     * @param driver
     *      Instance of the {@link WebDriver} which controls the navigation
     * @param shouldBeFound
     *      Whether bundle being filtered should be found. If so, wait for it to show.
     * @throws InterruptedException
     *      thrown in the event thread sleep is interrupted while waiting for page to render
     */
Retrieves the search bar element and enters the name of the bundle to be searched for then optionally waits for
that entry to be shown.

@param bundleSymbolicName
symbolic name of the bundle being searched for
@param driver
Instance of the  WebDriver which controls the navigation
@param shouldBeFound
Whether bundle being filtered should be found. If so, wait for it to show.
@throws InterruptedException
thrown in the event thread sleep is interrupted while waiting for page to render
Retrieves the search bar element and enters the name of the bundle to be searched for then optionally waits for that entry to be shown . @param bundleSymbolicName symbolic name of the bundle being searched for @param driver Instance of the WebDriver which controls the navigation @param shouldBeFound Whether bundle being filtered should be found . If so wait for it to show . @throws InterruptedException thrown in the event thread sleep is interrupted while waiting for page to render
public static WebElement filterBundles(WebDriver driver, String bundleSymbolicName, boolean shouldBeFound) 
            throws InterruptedException
    {
        NavigationHelper.pageAndTabCheck(driver, NavigationButtonNameConstants.NAVBUT_PROP_SYS_CONFIG, BUNDLE_TAB_ID);
        WebDriverWait wait = new WebDriverWait(driver, 5);
        wait.until(ExpectedConditions.visibilityOfElementLocated(By.cssSelector("input[id*='globalFilter']")));
        WebElement searchBar = driver.findElement(By.cssSelector("input[id*='globalFilter']"));
        GeneralHelper.retrySendKeys(driver, searchBar, bundleSymbolicName, 5);
        if (shouldBeFound)
        {
            MultipleByChain rows = waitForBundleFilter(driver, new Function<Collection<String>, Boolean>()
            {
                @Override
                public Boolean apply(Collection<String> bundleSymbolicNames)
                {
                    return bundleSymbolicNames.size() == 1;
                }
            });
            WebElement bundleNameCell = rows.extendChain()
                    .index(0) 
                    .multiple(By.tagName("span"))
                    .index(2)
                    .build()
                    .findElement();
            assertThat(bundleNameCell.getText(), is("(" + bundleSymbolicName + ")"));
            return rows.extendChain().index(0).build().findElement();
        }
        else
        {
            waitForBundleFilter(driver, new Function<Collection<String>, Boolean>()
            {
                @Override
                public Boolean apply(Collection<String> bundleSymbolicNames)
                {
                    return bundleSymbolicNames.size() == 0;
                }
            });
            return null;
        }
    }
public static WebElement filterBundles ( WebDriver driver , String bundleSymbolicName , boolean shouldBeFound ) throws InterruptedException { NavigationHelper . pageAndTabCheck ( driver , NavigationButtonNameConstants . NAVBUT_PROP_SYS_CONFIG , BUNDLE_TAB_ID ) ; WebDriverWait wait = new WebDriverWait ( driver , 5 ) ; wait . until ( ExpectedConditions . visibilityOfElementLocated ( By . cssSelector ( "input[id*='globalFilter']" ) ) ) ; WebElement searchBar = driver . findElement ( By . cssSelector ( "input[id*='globalFilter']" ) ) ; GeneralHelper . retrySendKeys ( driver , searchBar , bundleSymbolicName , 5 ) ; if ( shouldBeFound ) { MultipleByChain rows = waitForBundleFilter ( driver , new Function < Collection < String > , Boolean > ( ) { @ Override public Boolean apply ( Collection < String > bundleSymbolicNames ) { return bundleSymbolicNames . size ( ) == 1 ; } } ) ; WebElement bundleNameCell = rows . extendChain ( ) . index ( 0 ) . multiple ( By . tagName ( "span" ) ) . index ( 2 ) . build ( ) . findElement ( ) ; assertThat ( bundleNameCell . getText ( ) , is ( "(" + bundleSymbolicName + ")" ) ) ; return rows . extendChain ( ) . index ( 0 ) . build ( ) . findElement ( ) ; } else { waitForBundleFilter ( driver , new Function < Collection < String > , Boolean > ( ) { @ Override public Boolean apply ( Collection < String > bundleSymbolicNames ) { return bundleSymbolicNames . size ( ) == 0 ; } } ) ; return null ; } }
Retrieves the search bar element and enters the name of the bundle to be searched for then optionally waits for
 that entry to be shown.
Retrieves the search bar element and enters the name of the bundle to be searched for then optionally waits for that entry to be shown .
// wait for exactly 1 bundle being displayed // first row (already confirmed index above) // wait for exactly 0 bundles