title: StaleElementReferenceException when iterating through dynamical iterable
body: <p>I want to scroll down the website by looping through all webElements and I'm doing it in this way:</p>
  <pre><code>driver.get('https://justjoin.it/')
  driver.maximize_window()
  
  while True:
      for web_element in driver.find_elements_by_class_name('css-1x9zltl'):
          driver.execute_script(&quot;arguments[0].scrollIntoView();&quot;, web_element)
  </code></pre>
  <p>Unfortunately after few seconds scroll bar stops and console throws me this exception:</p>
  <pre><code>Message: stale element reference: element is not attached to the page document 
  </code></pre>
  <p>Looking for solutions I searched a lot of webpages and now I know why I have this type of error. I tried to solve that by using try/except and it works but of course it doesn't solve the essence of the problem. I want to know Is there a better way to solve my issue?</p>