Hire QA – Specialized in QA Recruitment, Technical Interviews and Testing Solutions

Selecting Radio Button in Selenium-WebDriver

Category: Selenium WebDriver

public static void selectRadioButton(WebDriver driver, By locator, String value){ 
List select = driver.findElements(locator);
for (WebElement element : select)
{
if (element.getAttribute("value").equalsIgnoreCase(value)){
element.click();
}
}

Leave a Reply

Your email address will not be published. Required fields are marked *