i have a web application ,their some dropdowns are their and want to automate them.
I am trying
driver.findElement("By.id("ID")").click(); driver.findElement("By.id("ID")").sendKey("India");
driver.findElement("By.id("ID")").click();
driver.findElement("By.id("ID")").sendKey("India");
But not working.
you should use select class like this :
Select select = new Select(driver.findElement("By.id("ID")")); select.selectByValue("india");