How to check If the radio button is clicked

How to check If the radio button is clicked

Please try this

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