I am not able to select a particular value from the dropdown even though that value exists in the drop down options.
@Test
public void testclass() throws InterruptedException
{
driver.get("
http://www.indianrail.gov.in/between_Imp_Stations.html");
WebDriverWait wait = new WebDriverWait(driver, 2);
wait.until(ExpectedConditions.presenceOfElementLocated(By.name("lccp_src_stncode")));
WebElement Source_station = driver.findElement(By.name("lccp_src_stncode"));
Select dropdown = new Select(Source_station);
List<WebElement> options = dropdown.getOptions();
for(WebElement option : options){
System.out.println(option.getText());
}
dropdown.selectByValue("CHENNAI - MAS");
}