Selecting an item from dropdown list using Selenium WebDriver java?
Hello Emma,
Use the below code:
new Select(driver.findElement(By.id("blood-group"))).selectByVisibleText("AB");
You also need to import org.openqa.selenium.support.ui.Select;
Selecting an item from dropdown list using Selenium WebDriver java?
Hello Emma,
Use the below code:
new Select(driver.findElement(By.id("blood-group"))).selectByVisibleText("AB");
You also need to import org.openqa.selenium.support.ui.Select;