title: Cannot locate option dropdown with value in selenium web driver
body: <pre><code>   wait.until(ExpectedConditions.visibilityOfElementLocated(By.id(&quot;LOGON_selectedUser&quot;)));
     
     WebElement mySelectElement = driver.findElement(By.id(&quot;LOGON_selectedUser&quot;));
     
     mySelectElement.click();
     
     
       Select dropdown= new Select(driver.findElement(By.id(&quot;LOGON_selectedUser&quot;)));
    
       dropdown.selectByVisibleText(&quot;HOTLINE-FAMILY SAFETY - Acting Supervisor&quot;);
  </code></pre>
  <p>Below is the error I'm getting:</p>
  <p>Cannot locate option with text: HOTLINE-FAMILY SAFETY - Acting Supervisor
  I tried with by. value bit no luck. :(</p>
  <p>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.</p>
  <p>Here is the DOM:</p>
  <p><a href="https://i.stack.imgur.com/wsxWC.png" rel="nofollow noreferrer">enter image description here</a></p>