Do you know how to verify if the checkbox/radio is checked or not?

Submitted by: Muhammad
isSelected() method is used to verify if the checkbox/radio is checked or not. An example -

driver.findElement(By.xpath("XPath of the checkbox/radio button")).isSelected();
Submitted by: Muhammad

Read Online Automation Job Interview Questions And Answers