Following is my code
Select drpCounty = new Select(driver.findElement(By.name("county")));
drpCounty.selectByVisibleText("Bedfordshire");
Following is my code
Select drpCounty = new Select(driver.findElement(By.name("county")));
drpCounty.selectByVisibleText("Bedfordshire");
Check visibility of elements:
new WebDriverWait(driver, 15).until(ExpectedConditions.visibilityOfElementLocated(By.name("county")));
Select drpCounty = new Select(driver.findElement(By.name("county")));
drpCounty.selectByVisibleText("Bedfordshire");