In my application , I have 3 listboxs, when I select any of the value in first listbox , the generate button is in progressing status (button is changed to rotating Symbol), the corresponding data is loaded in the remaining listboxes, and the generate button should appear. For that condition , I wrote the code like 

```
WebElement datarefresh_element = (new WebDriverWait(driver, 20)).until(ExpectedConditions.visibilityOfElementLocated
 (By.id("butGenerate")));

if(datarefresh_element.isDisplayed()==true)
{

      System.out.println("Generate button is available");
}
    Select Dimension_selection = new Select  (driver.findElement(By.id("cbDimension")));
            Dimension_selection.selectByVisibleText("Net Flow");
            Dimension_selection.selectByVisibleText("Total Sales");

```

while executing the code, the if condition is satisfied ,but when I select the data in the second list box, the data is not selected. Could you please help / suggest , I need to use alternative expected condition in the driver for find the element.