0

Every element that I want to click changes the web-page by creating more elements. When I click the first, no problem. On the second element that has to be clicked, an ElementClickInterceptedException is raised, because the element has changed positions because of the first clicking. How do I click all elements without exceptions?
This is my code:

elements = driver.find_elements_by_css_selector('div.something')
for i in elements:
    i.click()

that brings up this error:

selenium.common.exceptions.ElementClickInterceptedException: Message: element click intercepted:
Element <div class="something">...</div> is not clickable at point (5, 5). Other element would
receive the click: <div class="another_thing">...</div>
Vy Do
  • 46,709
  • 59
  • 215
  • 313
Mario
  • 561
  • 3
  • 18
  • @DebanjanB My question is not the same as the one you pointed at and couldn't be solved by the way described because the problem is different. My problem: elements move after click. The problem in the other question: element is overlapped by another element – Mario Jul 06 '20 at 17:45
  • How can we imagine your question without **a clear problem statement**? See: [How to create a Minimal, Complete, and Verifiable example.](https://stackoverflow.com/help/mcve) – undetected Selenium Jul 06 '20 at 17:50
  • @DebanjanB my question is minimal, complete and reproductible, with every needed detail posted. I wrote that "an ElementClickInterceptedException is raised, because the element has **changed** positions because of the first clicking" I didn't mention any overlaps. But I get it they look alike – Mario Jul 06 '20 at 17:54

0 Answers0