I'm getting this error
selenium.common.exceptions.ElementNotInteractableException: Message: element not interactable: Element is not currently visible and may not be manipulated
For this line with //option[. = 'Individual']
dropdown = self.driver.find_element(By.CSS_SELECTOR, "#selectClaimantTypeContainer select")
WebDriverWait(self.driver, 20).until(EC.visibility_of_element_located((By.XPATH, "//option[. = 'Individual']"))).click()
I've added WebDriverWait and still the error persists? The dropdown options are loaded dynamically via ajax.
How do i solve? This is how the code looks with WebDriverWait
dropdown = self.driver.find_element(By.CSS_SELECTOR, "#selectClaimantTypeContainer select")
dropdown.find_element(By.XPATH, "//option[. = 'Individual']").click()