How might you check the condition of a checkbox/radio button?

875    Asked by LachlanCameron in QA Testing , Asked on Feb 3, 2020
Answered by Lachlan Cameron

We can call the isSelected() strategy to test the status of these components.

Model Code:

boolean test = driver.findElement(By.xpath("checkbox/radio button XPath")).isSelected();

Your Answer


Parent Categories