Automation Question:

Download Job Interview Questions and Answers PDF

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

Automation Interview Question
Automation Interview Question

Answer:

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();

Download Automation Interview Questions And Answers PDF

Previous QuestionNext Question
Do you know how to mouse hover an element in Selenium?Explain me how to check if an element is visible on the page?