title: Find elements that are showing and hiding depending on the scroll height - python-selebium-webdriver
body: <p>I'm trying to automate my spendings&amp;budget, but the website of the bank reveals/hides the element I am looking for, depending on the scroll height.</p>
  <p><strong>Example</strong></p>
  <p>This is when I am at the top of the page:</p>
  <p><a href="https://i.stack.imgur.com/XYJtl.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/XYJtl.png" alt="This is when I am at the top of the page:" /></a></p>
  <p>And this is when I scrolled a little:</p>
  <p><a href="https://i.stack.imgur.com/l6On2.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/l6On2.png" alt="This is when I am at top of the transaction page:" /></a></p>
  <p><strong>Problem</strong></p>
  <p>I am trying to get all elements in this <code>role='transactions-group'</code> but, when I added an option for scrolling:</p>
  <pre><code>driver.execute_script(&quot;window.scrollTo(0,document.body.scrollHeight)&quot;)
  transactions = driver.find_elements_by_xpath(
      &quot;//div[@role='transactions-group']&quot;)
  print(str(transactions[0].text))
  </code></pre>
  <p>it just loaded everything, but it continued to find the items that in this case were on the bottom of the page.</p>
  <p>So my question is: Can I do some kind of loop or something to fix this problem?</p>