mil.dod.th.ose.gui.integration/src/mil/dod/th/ose/gui/integration/helpers/AssetHelper.java
public static void chooseAssetTab(final WebDriver driver, final AssetTabConstants constants)
    {
        String assetTabAnchor = "";
        String assetTabDiv = "";
        if (constants.equals(AssetTabConstants.CONFIGURATION_TAB))
        {
            assetTabAnchor = "a[href*='assetConfig']";
            assetTabDiv = "div[id$='assetConfig']";
        }
        else if (constants.equals(AssetTabConstants.OBSERVATION_TAB))
        {
            assetTabAnchor = "a[href*='assetObsTab']";
            assetTabDiv = "div[id$='assetObsTab']";
        }
        else if (constants.equals(AssetTabConstants.COMMAND_TAB))
        {
            assetTabAnchor = "a[href*='assetCommandTab']";
            assetTabDiv = "div[id$='assetCommandTab']";
        }
        
        if (!driver.findElement(By.cssSelector(assetTabDiv)).isDisplayed())
        {
            LOG.log(Level.INFO, "Clicking asset tab [{0}]", assetTabAnchor);
            GeneralHelper.safeClickBySelector(By.cssSelector(assetTabAnchor));
            
            WebDriverWait wait = new WebDriverWait(driver, 30);
            wait.ignoring(NoSuchElementException.class);
            wait.until(ExpectedConditions.visibilityOfElementLocated(By.cssSelector(assetTabDiv)));
        }
    }
/**
     * Function navigates to a specified tab on the asset page. This function assumes that 
     * the asset page has been navigated to.
     * @param driver
     *  the web driver to use
     * @param constants
     *  the {@link AssetTabConstants} which identifies which tab to navigate to.
     */
Function navigates to a specified tab on the asset page. This function assumes that
the asset page has been navigated to.
@param driver
the web driver to use
@param constants
the  AssetTabConstants which identifies which tab to navigate to.
Function navigates to a specified tab on the asset page . This function assumes that the asset page has been navigated to . @param driver the web driver to use @param constants the AssetTabConstants which identifies which tab to navigate to .
public static void chooseAssetTab(final WebDriver driver, final AssetTabConstants constants)
    {
        String assetTabAnchor = "";
        String assetTabDiv = "";
        if (constants.equals(AssetTabConstants.CONFIGURATION_TAB))
        {
            assetTabAnchor = "a[href*='assetConfig']";
            assetTabDiv = "div[id$='assetConfig']";
        }
        else if (constants.equals(AssetTabConstants.OBSERVATION_TAB))
        {
            assetTabAnchor = "a[href*='assetObsTab']";
            assetTabDiv = "div[id$='assetObsTab']";
        }
        else if (constants.equals(AssetTabConstants.COMMAND_TAB))
        {
            assetTabAnchor = "a[href*='assetCommandTab']";
            assetTabDiv = "div[id$='assetCommandTab']";
        }
        if (!driver.findElement(By.cssSelector(assetTabDiv)).isDisplayed())
        {
            LOG.log(Level.INFO, "Clicking asset tab [{0}]", assetTabAnchor);
            GeneralHelper.safeClickBySelector(By.cssSelector(assetTabAnchor));
            WebDriverWait wait = new WebDriverWait(driver, 30);
            wait.ignoring(NoSuchElementException.class);
            wait.until(ExpectedConditions.visibilityOfElementLocated(By.cssSelector(assetTabDiv)));
        }
    }
public static void chooseAssetTab ( final WebDriver driver , final AssetTabConstants constants ) { String assetTabAnchor = "" ; String assetTabDiv = "" ; if ( constants . equals ( AssetTabConstants . CONFIGURATION_TAB ) ) { assetTabAnchor = "a[href*='assetConfig']" ; assetTabDiv = "div[id$='assetConfig']" ; } else if ( constants . equals ( AssetTabConstants . OBSERVATION_TAB ) ) { assetTabAnchor = "a[href*='assetObsTab']" ; assetTabDiv = "div[id$='assetObsTab']" ; } else if ( constants . equals ( AssetTabConstants . COMMAND_TAB ) ) { assetTabAnchor = "a[href*='assetCommandTab']" ; assetTabDiv = "div[id$='assetCommandTab']" ; } if ( ! driver . findElement ( By . cssSelector ( assetTabDiv ) ) . isDisplayed ( ) ) { LOG . log ( Level . INFO , "Clicking asset tab [{0}]" , assetTabAnchor ) ; GeneralHelper . safeClickBySelector ( By . cssSelector ( assetTabAnchor ) ) ; WebDriverWait wait = new WebDriverWait ( driver , 30 ) ; wait . ignoring ( NoSuchElementException . class ) ; wait . until ( ExpectedConditions . visibilityOfElementLocated ( By . cssSelector ( assetTabDiv ) ) ) ; } }
Function navigates to a specified tab on the asset page.
Function navigates to a specified tab on the asset page .