mil.dod.th.ose.gui.integration/src/mil/dod/th/ose/gui/integration/helpers/observation/ObservationFilterHelper.java
public static void clickFilterByExpressionCheckBox(final WebDriver driver)
    {
        WebDriverWait wait = new WebDriverWait(driver, 60);
        
        wait.until(ExpectedConditions.visibilityOfElementLocated(By.cssSelector("div[id$='filteringPanel']")));
        WebElement checkBoxDiv = 
                driver.findElement(By.cssSelector("div[id$='tabView:obsQueryPanel:obsAccordion:filterStringBox']"));
        
        List<WebElement> obsFilterText = driver.findElements(By.cssSelector("input[id$='obsFilter']"));

        WebElement numberCheckBox = checkBoxDiv.findElement(By.cssSelector("div[class*='ui-chkbox-box']"));
        GeneralHelper.safeClick(numberCheckBox);
        
        if (obsFilterText.isEmpty())
        {
            //If empty then the filter by expression was not selected, wait until text box is visible
            wait.until(ExpectedConditions.visibilityOfElementLocated(By.cssSelector("input[id$='obsFilter']")));
        }
        else
        {
            //the filter by expression was selected, wait until text box is invisible
            wait.until(ExpectedConditions.invisibilityOfElementLocated(By.cssSelector("input[id$='obsFilter']")));
        }
    }
/**
     * Method checks the filter by expression check box on the observation tab.
     * 
     * @param driver
     *      {@link WebDriver} currently in use for running the tests.
     */
Method checks the filter by expression check box on the observation tab.

@param driver
WebDriver currently in use for running the tests.
Method checks the filter by expression check box on the observation tab . @param driver WebDriver currently in use for running the tests .
public static void clickFilterByExpressionCheckBox(final WebDriver driver)
    {
        WebDriverWait wait = new WebDriverWait(driver, 60);
        wait.until(ExpectedConditions.visibilityOfElementLocated(By.cssSelector("div[id$='filteringPanel']")));
        WebElement checkBoxDiv = 
                driver.findElement(By.cssSelector("div[id$='tabView:obsQueryPanel:obsAccordion:filterStringBox']"));
        List<WebElement> obsFilterText = driver.findElements(By.cssSelector("input[id$='obsFilter']"));
        WebElement numberCheckBox = checkBoxDiv.findElement(By.cssSelector("div[class*='ui-chkbox-box']"));
        GeneralHelper.safeClick(numberCheckBox);
        if (obsFilterText.isEmpty())
        {
            wait.until(ExpectedConditions.visibilityOfElementLocated(By.cssSelector("input[id$='obsFilter']")));
        }
        else
        {
            wait.until(ExpectedConditions.invisibilityOfElementLocated(By.cssSelector("input[id$='obsFilter']")));
        }
    }
public static void clickFilterByExpressionCheckBox ( final WebDriver driver ) { WebDriverWait wait = new WebDriverWait ( driver , 60 ) ; wait . until ( ExpectedConditions . visibilityOfElementLocated ( By . cssSelector ( "div[id$='filteringPanel']" ) ) ) ; WebElement checkBoxDiv = driver . findElement ( By . cssSelector ( "div[id$='tabView:obsQueryPanel:obsAccordion:filterStringBox']" ) ) ; List < WebElement > obsFilterText = driver . findElements ( By . cssSelector ( "input[id$='obsFilter']" ) ) ; WebElement numberCheckBox = checkBoxDiv . findElement ( By . cssSelector ( "div[class*='ui-chkbox-box']" ) ) ; GeneralHelper . safeClick ( numberCheckBox ) ; if ( obsFilterText . isEmpty ( ) ) { wait . until ( ExpectedConditions . visibilityOfElementLocated ( By . cssSelector ( "input[id$='obsFilter']" ) ) ) ; } else { wait . until ( ExpectedConditions . invisibilityOfElementLocated ( By . cssSelector ( "input[id$='obsFilter']" ) ) ) ; } }
Method checks the filter by expression check box on the observation tab.
Method checks the filter by expression check box on the observation tab .
//If empty then the filter by expression was not selected, wait until text box is visible //the filter by expression was selected, wait until text box is invisible