mil.dod.th.ose.gui.integration/src/mil/dod/th/ose/gui/integration/helpers/NavigationHelper.java
public static void pageAndTabCheck(final WebDriver driver, final String navButtonConstant, 
            final String tabId) throws InterruptedException
    {
        //Check to see if the current page is the specified page. If not then navigate the specified page.
        if (!driver.getCurrentUrl().contains(m_NavMap.get(navButtonConstant)))
        {
            navigateToPage(driver, navButtonConstant);
        }
        if (tabId != null && !tabId.isEmpty())
        {
            //Check to see which tab the page is on. If it is not on specified tab then navigate to it.
            if (!driver.findElement(By.cssSelector("div[id$='" + tabId + "']")).isDisplayed())
            {
                driver.findElement(By.cssSelector("a[href$='" + tabId + "']")).click();
                
                WebDriverWait wait = new WebDriverWait(driver, 10);
                wait.ignoring(NoSuchElementException.class);
                wait.until(ExpectedConditions.visibilityOfElementLocated(
                        By.cssSelector("div[id$='" + tabId + "']")));
            }
        }
    }
/**
     * Method used to verify that GUI is on the correct page and on the correct tab if that page has multiple tabs.
     * 
     * @param driver
     *      The {@link WebDriver} running the test.
     * @param navButtonConstant
     *      The {@link NavigationButtonNameConstants} that represents the button name of the page the driver should be 
     *      on.
     * @param tabId
     *      ID of the tab the driver should be on within the specified page.
     */
Method used to verify that GUI is on the correct page and on the correct tab if that page has multiple tabs.

@param driver
The  WebDriver running the test.
@param navButtonConstant
The  NavigationButtonNameConstants that represents the button name of the page the driver should be
on.
@param tabId
ID of the tab the driver should be on within the specified page.
Method used to verify that GUI is on the correct page and on the correct tab if that page has multiple tabs . @param driver The WebDriver running the test . @param navButtonConstant The NavigationButtonNameConstants that represents the button name of the page the driver should be on . @param tabId ID of the tab the driver should be on within the specified page .
public static void pageAndTabCheck(final WebDriver driver, final String navButtonConstant, 
            final String tabId) throws InterruptedException
    {
        if (!driver.getCurrentUrl().contains(m_NavMap.get(navButtonConstant)))
        {
            navigateToPage(driver, navButtonConstant);
        }
        if (tabId != null && !tabId.isEmpty())
        {
            if (!driver.findElement(By.cssSelector("div[id$='" + tabId + "']")).isDisplayed())
            {
                driver.findElement(By.cssSelector("a[href$='" + tabId + "']")).click();
                WebDriverWait wait = new WebDriverWait(driver, 10);
                wait.ignoring(NoSuchElementException.class);
                wait.until(ExpectedConditions.visibilityOfElementLocated(
                        By.cssSelector("div[id$='" + tabId + "']")));
            }
        }
    }
public static void pageAndTabCheck ( final WebDriver driver , final String navButtonConstant , final String tabId ) throws InterruptedException { if ( ! driver . getCurrentUrl ( ) . contains ( m_NavMap . get ( navButtonConstant ) ) ) { navigateToPage ( driver , navButtonConstant ) ; } if ( tabId != null && ! tabId . isEmpty ( ) ) { if ( ! driver . findElement ( By . cssSelector ( "div[id$='" + tabId + "']" ) ) . isDisplayed ( ) ) { driver . findElement ( By . cssSelector ( "a[href$='" + tabId + "']" ) ) . click ( ) ; WebDriverWait wait = new WebDriverWait ( driver , 10 ) ; wait . ignoring ( NoSuchElementException . class ) ; wait . until ( ExpectedConditions . visibilityOfElementLocated ( By . cssSelector ( "div[id$='" + tabId + "']" ) ) ) ; } } }
Method used to verify that GUI is on the correct page and on the correct tab if that page has multiple tabs.
Method used to verify that GUI is on the correct page and on the correct tab if that page has multiple tabs .
//Check to see if the current page is the specified page. If not then navigate the specified page. //Check to see which tab the page is on. If it is not on specified tab then navigate to it.