How to check If the radio button is clicked

#1

How to check If the radio button is clicked

0 Likes

#2

Please try this

String str = driver.findElement(By.id("")).getAttribute(“checked”);
if (str.equalsIgnoreCase(“true”))
{
System.out.println(“Checkbox selected”);
}

0 Likes