I use selenium
with python
and want to mark a checkbox by clicking on it.
After having identified the <input>
tag of the checkbox with selenium, I attempt to click on it with
checkbox.click()
However, it throws the ElementClickInterceptedException
.
I identify the checkbox I want to click on through a loop. When I try to click on the checkbox outside of the loop (by manually running the code after it was identified and saved to a variable), I found two things:
checkbox.click()
, it works as expectedAny ideas why and how I could attempt to slove this issue (i.e. being able to click on the checkbox within the loop)?
Thanks!
You either deal with the overlapping element or use javascript
driver.execute_script("arguments[0].click();", checkbox)