Couldn't click the text in dropdown | Selenium Forum
M
Posted on 09/03/2016
In salesforce website i tried to create the new user details but i couldn't select the Employee details. I want to select some text from dropdown. Its giving element not visible exception. I tried explicit wait also and also tried writing manually xpath also.Its not working.Pleae help me.

WebElement companyEmployee = driver.findElement(By.id("CompanyEmployees"));

WebDriverWait wait = new WebDriverWait(driver, 15);
wait.until((ExpectedConditions.visibilityOfElementLocated(By.id("CompanyEmployees")))).click();
Select dropDown = new Select(companyEmployee);
dropDown.selectByVisibleText("1 - 5 employees");

M
Replied on 10/03/2016

try send keys with drop down it might work.