title: How to select item from drop down list using Selenium WebDriver with Java?
body: <p>I have a login page. In my test case I am able to login with the credentials but once I have logged in I am trying to select item from drop down list. I have the below code but I am getting an error </p>
  
  <pre><code>Select select = (Select) driver.findElement(By.id("Id goes here"));
          select.selectByValue("Value Goes here");
  </code></pre>
  
  <p>I am getting the below error 
  Unable to locate element: {"method":"id","selector":"Value of Id"}</p>
  
  <p>Note: the URL to login is different than the one on which select box is appearing. Can that be a problem? Is there a way to resolve it?</p>