mil.dod.th.ose.gui.integration/src/mil/dod/th/ose/gui/integration/helpers/BundleManagerUtil.java
public static void stopBundle(WebDriver driver, String bundleSymbolicName) throws InterruptedException
    {
        NavigationHelper.pageAndTabCheck(driver, NavigationButtonNameConstants.NAVBUT_PROP_SYS_CONFIG, BUNDLE_TAB_ID);
        
        //Uses the bundle search bar feature to find the specified bundle.
        clearBundleFilter(driver);
        filterBundles(driver, bundleSymbolicName, true);
        
        Wait<WebDriver> fwait = new FluentWait<WebDriver>(driver).withTimeout(30, TimeUnit.SECONDS).
                pollingEvery(2, TimeUnit.SECONDS).ignoring(NoSuchElementException.class, 
                        StaleElementReferenceException.class);
        
        DebugText.pushText("Attempting to click stop button until active");
        fwait.until(new ExpectedCondition<Boolean>()
        {
            @Override
            public Boolean apply(WebDriver driver)
            {
                WebElement bundleTable = driver.findElement(By.cssSelector("tbody[id*='bundleTable_data']"));
                WebElement bundleState = bundleTable.findElements(By.tagName("span")).get(3);
        
                //Check if bundle is resolved. If it isn't resolved then return.
                if (bundleState.getText().equals("Active"))
                {
                    //Stop the bundle.
                    bundleTable.findElement(By.cssSelector("button[id*='stop']")).click();
                    return true;
                }
                return false;
            }
        });
        DebugText.popText();
        
        //wait until filtered bundle reaches a resolved state
        DebugText.pushText("Waiting for resolved state update");
        fwait.until(ExpectedConditions.presenceOfElementLocated(By.cssSelector("tbody span.bundleStateResolved")));
        DebugText.popText();
        
        //Needed to give the bundle table time to update.
        GeneralHelper.sleepWithText(5, "Waiting for bundle table to completely update");
    }
/**
     * Method that stops the specified bundle.
     * @param driver
     *      Instance of the {@link WebDriver} to be used.
     * @param bundleSymbolicName
     *      Symbolic name of the bundle to stop.
     */
Method that stops the specified bundle.
@param driver
Instance of the  WebDriver to be used.
@param bundleSymbolicName
Symbolic name of the bundle to stop.
Method that stops the specified bundle . @param driver Instance of the WebDriver to be used . @param bundleSymbolicName Symbolic name of the bundle to stop .
public static void stopBundle(WebDriver driver, String bundleSymbolicName) throws InterruptedException
    {
        NavigationHelper.pageAndTabCheck(driver, NavigationButtonNameConstants.NAVBUT_PROP_SYS_CONFIG, BUNDLE_TAB_ID);
        clearBundleFilter(driver);
        filterBundles(driver, bundleSymbolicName, true);
        Wait<WebDriver> fwait = new FluentWait<WebDriver>(driver).withTimeout(30, TimeUnit.SECONDS).
                pollingEvery(2, TimeUnit.SECONDS).ignoring(NoSuchElementException.class, 
                        StaleElementReferenceException.class);
        DebugText.pushText("Attempting to click stop button until active");
        fwait.until(new ExpectedCondition<Boolean>()
        {
            @Override
            public Boolean apply(WebDriver driver)
            {
                WebElement bundleTable = driver.findElement(By.cssSelector("tbody[id*='bundleTable_data']"));
                WebElement bundleState = bundleTable.findElements(By.tagName("span")).get(3);
                if (bundleState.getText().equals("Active"))
                {
                    bundleTable.findElement(By.cssSelector("button[id*='stop']")).click();
                    return true;
                }
                return false;
            }
        });
        DebugText.popText();
        DebugText.pushText("Waiting for resolved state update");
        fwait.until(ExpectedConditions.presenceOfElementLocated(By.cssSelector("tbody span.bundleStateResolved")));
        DebugText.popText();
        GeneralHelper.sleepWithText(5, "Waiting for bundle table to completely update");
    }
public static void stopBundle ( WebDriver driver , String bundleSymbolicName ) throws InterruptedException { NavigationHelper . pageAndTabCheck ( driver , NavigationButtonNameConstants . NAVBUT_PROP_SYS_CONFIG , BUNDLE_TAB_ID ) ; clearBundleFilter ( driver ) ; filterBundles ( driver , bundleSymbolicName , true ) ; Wait < WebDriver > fwait = new FluentWait < WebDriver > ( driver ) . withTimeout ( 30 , TimeUnit . SECONDS ) . pollingEvery ( 2 , TimeUnit . SECONDS ) . ignoring ( NoSuchElementException . class , StaleElementReferenceException . class ) ; DebugText . pushText ( "Attempting to click stop button until active" ) ; fwait . until ( new ExpectedCondition < Boolean > ( ) { @ Override public Boolean apply ( WebDriver driver ) { WebElement bundleTable = driver . findElement ( By . cssSelector ( "tbody[id*='bundleTable_data']" ) ) ; WebElement bundleState = bundleTable . findElements ( By . tagName ( "span" ) ) . get ( 3 ) ; if ( bundleState . getText ( ) . equals ( "Active" ) ) { bundleTable . findElement ( By . cssSelector ( "button[id*='stop']" ) ) . click ( ) ; return true ; } return false ; } } ) ; DebugText . popText ( ) ; DebugText . pushText ( "Waiting for resolved state update" ) ; fwait . until ( ExpectedConditions . presenceOfElementLocated ( By . cssSelector ( "tbody span.bundleStateResolved" ) ) ) ; DebugText . popText ( ) ; GeneralHelper . sleepWithText ( 5 , "Waiting for bundle table to completely update" ) ; }
Method that stops the specified bundle.
Method that stops the specified bundle .
//Uses the bundle search bar feature to find the specified bundle. //Check if bundle is resolved. If it isn't resolved then return. //Stop the bundle. //wait until filtered bundle reaches a resolved state //Needed to give the bundle table time to update.