I\'m having the following problem. I have a dropdown that is hidden so when I make the Select and run the test i get the following error:
org.openqa.seleniu
Since WebDriver tries to simulate real users, it cannot interact with elements which are invisible/hidden. To solve your issue, I think you would need to click on div first which will make the drop down visible and select option from the dropdown. I would recommend such an approach as opposed to pure Javascript way since it would simulate a real user. Give following a shot,
WebDriverWait wait = new WebDriverWait(driver, 300);
WebElement triggerDropDown = driver.findElement(By
.className("ui-helper-hidden"));
triggerDropDown.click();
WebElement selectElement = wait.until(ExpectedConditions
.visibilityOfElementLocated(By.id("formLevel:levels_input")));
Select select = new Select(selectElement);
select.selectByVisibleText("SECURITY");
Edit updated the class name of triggerDropDown