var selectCountry = driver.FindElement(By.Name("country")); // country is the name of the dropdown element
var selectedcountry = new SelectElement(selectCountry); // Select element in dropdown
selectedcountry.SelectByText("INDIA "); // Select value in list by using text.
We can select values by using Index, value also
var selectedcountry = new SelectElement(selectCountry); // Select element in dropdown
selectedcountry.SelectByText("INDIA "); // Select value in list by using text.
We can select values by using Index, value also
Pl let me know how to choose multiple options in combo box.
ReplyDelete