I'm trying to implement an explicit wait before giving a click on a checkbox:
WebDriverWait(self.driver, 10).until(EC.element_to_be_clickable((By.XPATH, "pay_type_list_item_id_salary"]")))
self.driver.find_element_by_xpath('//input[@id="pay_type_list_item_id_salary"]').click()
My problem is that my explicit wait keeps sending the error:
not clickable at point (663, 478). Other element would receive the click.
I'm trying to use different kind of explicit waits like visibility_of_element_located
or invisibility_of_element_located
(using an element from the previous step on my script), but no luck with those options.
If I add a time.sleep(1)
between the 2 lines my scripts works but I know it's not the most efficient thing to use time.sleep
.
The previous step before this one opens a calendar and I'm not sure if it tries to give the click when the calendar is closing and that's the reason to receive this error.