title: Unable to load Dynamic WebTable Content Selenium in Python 3.6
body: <p>I hope you're doing fine.</p>
  <p>I'm having a problem extracting rows of table from website by selenium. There are 50 rows showing on website but when I <strong>scrape</strong> it, there are only 8. First I didn't what was the problem but after so much struggle i found the problem, but can't seem to figure out the solution.</p>
  <p>So, the table loads content when i'm focusing on it. When i'm not focusing on other rows, the html look like this:
  <a href="https://imgur.com/a/5WR9xWE" rel="nofollow noreferrer">Div Elements When not focused</a></p>
  <pre><code>&lt;div class=&quot;x-grid3-row x-grid3-row-alt&quot; style=&quot;width:1355px;height:34px;&quot;&gt;&lt;/div&gt;
  </code></pre>
  <p>But when i go to those rows, it loads the content and unload previous rows.</p>
  <p><a href="https://imgur.com/a/U4cONPG" rel="nofollow noreferrer">Div Elements When Focused</a></p>
  <pre><code>&lt;div class=&quot;x-grid3-row x-grid3-row-alt&quot; style=&quot;width:1355px;height:34px;&quot;&gt;&lt;table class=&quot;x-grid3-row-table&quot; border=&quot;0&quot; cellspacing=&quot;0&quot; cellpadding=&quot;0&quot; style=&quot;width:1355px;height:34px;&quot;&gt;&lt;tbody&gt;&lt;tr&gt;&lt;td class=&quot;x-grid3-col x-grid3-cell x-grid3-td-0 x-grid3-cell-first &quot; style=&quot;width: 28px;text-align: center;&quot; tabindex=&quot;0&quot;&gt;&lt;div class=&quot;x-grid3-cell-inner x-grid3-col-0 x-unselectable&quot; unselectable=&quot;on&quot;&gt;&lt;a href=&quot;creative.form.php?id=1767&quot;&gt;1767&lt;/a&gt;&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;x-grid3-col x-grid3-cell x-grid3-td-1  x-grid3-check-col-td&quot; style=&quot;width: 38px;&quot; tabindex=&quot;0&quot;&gt;&lt;div class=&quot;x-grid3-cell-inner x-grid3-col-1 x-unselectable&quot; unselectable=&quot;on&quot;&gt;&lt;div class=&quot;x-grid3-check-col&quot;&gt;&amp;nbsp;&lt;/div&gt;&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;x-grid3-col x-grid3-cell x-grid3-td-2 &quot; style=&quot;width: 148px;&quot; tabindex=&quot;0&quot;&gt;&lt;div class=&quot;x-grid3-cell-inner x-grid3-col-2 x-unselectable&quot; unselectable=&quot;on&quot;&gt;&lt;a href=&quot;https://partner.hyaffiliates.com/afs/creative.form.php?id=1767&quot; onmouseover=&quot;adCreativePreviewShow(1767)&quot; onmouseout=&quot;adCreativePreviewHideDelay()&quot;&gt;&lt;img src=&quot;https://www.hycm.com/assets/img/home-header.jpg&quot; vspace=&quot;0&quot; hspace=&quot;0&quot; border=&quot;0&quot; width=&quot;6&quot; height=&quot;32&quot;&gt;&lt;/a&gt;&lt;/div&gt;&lt;div class=&quot;x-grid3-cell-adcreative-preview-container&quot; onmouseover=&quot;adCreativePreviewShow(1767)&quot; onmouseout=&quot;adCreativePreviewHideDelay()&quot; id=&quot;div_preview_creative_1767&quot; style=&quot;visibility: hidden; &quot;&gt;&lt;iframe src=&quot;viewad.php?id=1767&quot; width=&quot;120&quot; height=&quot;600&quot; hidden=&quot;&quot; style=&quot;display: none !important;&quot;&gt;&lt;/iframe&gt;&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;x-grid3-col x-grid3-cell x-grid3-td-3 &quot; style=&quot;width: 68px;&quot; tabindex=&quot;0&quot;&gt;&lt;div class=&quot;x-grid3-cell-inner x-grid3-col-3 x-unselectable&quot; unselectable=&quot;on&quot;&gt;HTML5&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;x-grid3-col x-grid3-cell x-grid3-td-4 &quot; style=&quot;width: 68px;&quot; tabindex=&quot;0&quot;&gt;&lt;div class=&quot;x-grid3-cell-inner x-grid3-col-4 x-unselectable&quot; unselectable=&quot;on&quot;&gt;Big&lt;br&gt;120x600&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;x-grid3-col x-grid3-cell x-grid3-td-5 &quot; style=&quot;width: 98px;&quot; tabindex=&quot;0&quot;&gt;&lt;div class=&quot;x-grid3-cell-inner x-grid3-col-5 x-unselectable&quot; unselectable=&quot;on&quot;&gt;HYAffiliates / HYCM&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;x-grid3-col x-grid3-cell x-grid3-td-6 &quot; style=&quot;width: 98px;&quot; tabindex=&quot;0&quot;&gt;&lt;div class=&quot;x-grid3-cell-inner x-grid3-col-6 x-unselectable&quot; unselectable=&quot;on&quot;&gt;RU Trading&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;x-grid3-col x-grid3-cell x-grid3-td-7 &quot; style=&quot;width: 98px;&quot; tabindex=&quot;0&quot;&gt;&lt;div class=&quot;x-grid3-cell-inner x-grid3-col-7 x-unselectable&quot; unselectable=&quot;on&quot;&gt;en&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;x-grid3-col x-grid3-cell x-grid3-td-8 &quot; style=&quot;width: 98px;&quot; tabindex=&quot;0&quot;&gt;&lt;div class=&quot;x-grid3-cell-inner x-grid3-col-8 x-unselectable&quot; unselectable=&quot;on&quot;&gt;AU&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;x-grid3-col x-grid3-cell x-grid3-td-9 &quot; style=&quot;width: 98px;&quot; tabindex=&quot;0&quot;&gt;&lt;div class=&quot;x-grid3-cell-inner x-grid3-col-9 x-unselectable&quot; unselectable=&quot;on&quot;&gt;&amp;nbsp;&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;x-grid3-col x-grid3-cell x-grid3-td-10 &quot; style=&quot;width: 78px;text-align: right;&quot; tabindex=&quot;0&quot;&gt;&lt;div class=&quot;x-grid3-cell-inner x-grid3-col-10 x-unselectable&quot; unselectable=&quot;on&quot;&gt;1&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;x-grid3-col x-grid3-cell x-grid3-td-11 &quot; style=&quot;width: 63px;text-align: right;&quot; tabindex=&quot;0&quot;&gt;&lt;div class=&quot;x-grid3-cell-inner x-grid3-col-11 x-unselectable&quot; unselectable=&quot;on&quot;&gt;4&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;x-grid3-col x-grid3-cell x-grid3-td-12 &quot; style=&quot;width: 53px;text-align: right;&quot; tabindex=&quot;0&quot;&gt;&lt;div class=&quot;x-grid3-cell-inner x-grid3-col-12 x-unselectable&quot; unselectable=&quot;on&quot;&gt;0&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;x-grid3-col x-grid3-cell x-grid3-td-13 &quot; style=&quot;width: 43px;text-align: right;&quot; tabindex=&quot;0&quot;&gt;&lt;div class=&quot;x-grid3-cell-inner x-grid3-col-13 x-unselectable&quot; unselectable=&quot;on&quot;&gt;0.00%&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;x-grid3-col x-grid3-cell x-grid3-td-14 &quot; style=&quot;width: 68px;text-align: right;&quot; tabindex=&quot;0&quot;&gt;&lt;div class=&quot;x-grid3-cell-inner x-grid3-col-14 x-unselectable&quot; unselectable=&quot;on&quot;&gt;0&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;x-grid3-col x-grid3-cell x-grid3-td-15 &quot; style=&quot;width: 93px;text-align: right;&quot; tabindex=&quot;0&quot;&gt;&lt;div class=&quot;x-grid3-cell-inner x-grid3-col-15 x-unselectable&quot; unselectable=&quot;on&quot;&gt;0&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;x-grid3-col x-grid3-cell x-grid3-td-16 x-grid3-cell-last &quot; style=&quot;width: 83px;text-align: right;&quot; tabindex=&quot;0&quot;&gt;&lt;div class=&quot;x-grid3-cell-inner x-grid3-col-16 x-unselectable&quot; unselectable=&quot;on&quot;&gt;$0.00&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;&lt;/tbody&gt;&lt;/table&gt;&lt;/div&gt;
  </code></pre>
  <p>As you can see, the bullets are visible now indicating it loaded all Childs now when i went/focused to those rows.</p>
  <p>I tried this method, but only give me those rows which are focused:</p>
  <pre><code>tables = driver.find_elements_by_xpath(&quot;//div[contains(@class,'x-grid3-row')]//tr&quot;)
      print(&quot;Length: &quot;+str(len(tables)))
      for i, table in enumerate(tables):
          data = [item.text for item in table.find_elements_by_xpath(&quot;.//*[self::td or self::th]&quot;)]
  </code></pre>
  <p>Anyone canplease help me? Thanks in advance</p>
  <p>Edited: Solution:</p>
  <pre><code> tables = driver.find_elements_by_xpath(&quot;//div[contains(@class,'x-grid3-row')]&quot;)
      saved = []
      for table in tables:
          driver.execute_script(&quot;arguments[0].scrollIntoView();&quot;, table)
          data = [item.text for item in table.find_elements_by_xpath(&quot;.//*[self::td or self::th]&quot;)]
          print(data)
          saved.append(data)
          time.sleep(0.5)
      print(len(saved))
  </code></pre>