I’m using Python with Selenium WebDriver to perform an assertion whether checkbox is checked or not on a webpage. There’s a checkbox element that has the selected checked attribute when I inspect it in the browser.
However, when I try to find the element using find_element_clickable or find_element_visible with an XPath locator (By.XPATH, “//input[@type=’checkbox’]), it returns None. This prevents me from using is_selected to check its state.
I’ve tried waiting for the element to be clickable using WebDriverWait and ExpectedConditions.element_to_be_clickable, but the issue persists.
I’m trying to determine if the checkbox is checked by default. Any suggestions on how to resolve this issue would be greatly appreciated.