wait.until(ExpectedConditions.visibilityOfElementLocated(By.id("LOGON_selectedUser")));
WebElement mySelectElement = driver.findElement(By.id("LOGON_selectedUser"));
mySelectElement.click();
Select dropdown= new Select(driver.findElement(By.id("LOGON_selectedUser")));
dropdown.selectByVisibleText("HOTLINE-FAMILY SAFETY - Acting Supervisor");
Below is the error I'm getting:
Cannot locate option with text: HOTLINE-FAMILY SAFETY - Acting Supervisor I tried with by. value bit no luck. :(
However, I'm able to select the dropdown with statement mySelectElement.click(); but when I try to select the drop-down, I'm keep on getting cannot locate the element. Pls help.
Here is the DOM: