title: Selenium Webdriver: Read a table completely
body: <p>Scenerio:In a webpage there are few tables present. I want to read one of the table completely, but the problem is only 10 rows are displayed, for rest i have to scroll down. Actually originally only 10 row are available, when we scroll rest of the filed are rendered. 
  To solve this i thought i will simulate key down and keep reading, but the problem is even the xpath is not consistent through out so cannot put in a loop too. Xpath for few different cells are: </p>
  
  <pre><code>html/body/div[2]/form/div[1]/div[2]/div/div[2]/div/div[2]/div/div[2]/div/div[2]/div/span/div[1]/div/div/div/div[2]/div/div[2]/table/tbody/tr[1]/td[1]
  
  html/body/div[2]/form/div[1]/div[2]/div/div[2]/div/div[2]/div/div[2]/div/div[2]/div/span/div[1]/div/div/div/div[2]/div/div[2]/table[2]/tbody/tr[3]/td[1]
  
  html/body/div[1]/form/div[1]/div[2]/div/div[2]/div/div[2]/div/div[2]/div/div[2]/div/span/div[1]/div/div/div/div[2]/div/div[2]/table[1]/tbody/tr[10]/td[1]
  </code></pre>
  
  <p>In what way can i get data  in all the cells ?</p>
  
  <p>HTML Source:</p>
  
  <pre><code>    &lt;div id="pt1:ph1" class="x6v"&gt;
      &lt;table class="xtb" width="0" cellspacing="0" cellpadding="0" border="0" summary=""&gt;
      &lt;div class="xvp"&gt;
      &lt;div&gt;
      &lt;div id="pt1:pc1" class="xpb xph" _afrclmwmn="['c1','c2','c3','c4','c5','c6','c7','c8','c9','c10']" _afrac="pt1:pc1:md1" style="height: 282px;"&gt;
      &lt;div id="pt1:pc1::_ahTp" style="height:auto"&gt;
      &lt;div id="pt1:pc1::_ahCt"&gt;
      &lt;div id="pt1:pc1:md1" class="xpj xpb" _leafcolclientids="['pt1:pc1:md1:c1','pt1:pc1:md1:c2','pt1:pc1:md1:c3','pt1:pc1:md1:c4','pt1:pc1:md1:c5','pt1:pc1:md1:c6','pt1:pc1:md1:c7','pt1:pc1:md1:c8','pt1:pc1:md1:c9','pt1:pc1:md1:c10','pt1:pc1:md1:c11','pt1:pc1:md1:c12']" _afrfilterable="true" _afrautohr="10" _afrhcc="0" _afrpcid="pt1:pc1" tabindex="0" style="height: 234px;"&gt;
      &lt;div id="pt1:pc1:md1::ch" class="xz5" _afrcolcount="12" style="overflow: hidden; position: relative; width: 753px;"&gt;
      &lt;div id="pt1:pc1:md1::db" class="xyy" _afrcolcount="12" style="position: relative; width: 753px; overflow: hidden; height: 170px; z-index: 1;"&gt;
      &lt;table class="xyz xzr" cellspacing="0" _startrow="0" _rowcount="44" _selstate="{'0':true}" _totalwidth="1260" style="table-layout:fixed;position:relative;width:1260px;"&gt;
      &lt;tbody&gt;
      &lt;tr class="xzn p_AFSelected" _afrrk="0"&gt;
      &lt;td class="xzk" nowrap="" style="width:100px;"&gt;12&lt;/td&gt;
      &lt;td class="xzk" nowrap="" style="width:100px;"&gt;A12&lt;/td&gt;
      &lt;td class="xzk" nowrap="" style="width:100px;"&gt;B12&lt;/td&gt;
      &lt;td class="xzk" nowrap="" style="width:100px;"&gt;B12&lt;/td&gt;
      &lt;td class="xzk" nowrap="" style="width:100px;"&gt;C12&lt;/td&gt;
      &lt;td class="xzk" nowrap="" style="width:100px;"&gt;D12&lt;/td&gt;
      &lt;td class="xzk" nowrap="" style="width:100px;"&gt; &lt;/td&gt;
      &lt;td class="xzk" nowrap="" style="width:100px;"&gt;K12&lt;/td&gt;
      &lt;td class="xzk" nowrap="" style="width:100px;"&gt; &lt;/td&gt;
      &lt;td class="xzk" nowrap="" style="width:100px;"&gt; &lt;/td&gt;
      &lt;td class="xzk" nowrap="" style="width:100px;"&gt; &lt;/td&gt;
      &lt;td class="xzk" nowrap="" style="width:100px;"&gt;G12&lt;/td&gt;
      &lt;/tr&gt;
      &lt;tr class="xzn" _afrrk="1"&gt;
      &lt;tr class="xzn" _afrrk="2"&gt;
      &lt;tr class="xzn" _afrrk="3"&gt;
      &lt;tr class="xzn" _afrrk="4"&gt;
      &lt;tr class="xzn" _afrrk="5"&gt;
      &lt;tr class="xzn" _afrrk="6"&gt;
      &lt;tr class="xzn" _afrrk="7"&gt;
      &lt;tr class="xzn" _afrrk="8"&gt;
      &lt;tr class="xzn" _afrrk="9"&gt;
      &lt;/tbody&gt;
      &lt;/table&gt;
      &lt;/div&gt;
      &lt;div id="pt1:pc1:md1::sm" class="xzu" style="position:absolute;display:none"&gt;&lt;/div&gt;
      &lt;div id="pt1:pc1:md1::ri" class="xz0" style="position:absolute;display:none;overflow:hidden"&gt;&lt;/div&gt;
      &lt;div id="pt1:pc1:md1::dataW" style="display:none"&gt;&lt;/div&gt;
      &lt;div id="pt1:pc1:md1::scroller" tabindex="-1" style="position: absolute; overflow: auto; z-index: 0; width: 770px; top: 46px; height: 187px; right: 0px;"&gt;
      &lt;/div&gt;
      &lt;/div&gt;
      &lt;div id="pt1:pc1::_ahBt" style="height:auto"&gt;
      &lt;div id="pt1:pc1:_clmCxt" style="display:none"&gt;
      &lt;div id="pt1:pc1:_PCPop" style="display:none"&gt;
      &lt;div id="pt1:pc1::_dchDlgC" style="display:none"&gt;
      &lt;/div&gt;
      &lt;/div&gt;
      &lt;/div&gt;
      &lt;/div&gt;
  </code></pre>
  
  <p>HTML after scrolling.</p>
  
  <pre><code>    &lt;div id="pt1:ph1" class="x6v"&gt;
      &lt;table class="xtb" width="0" cellspacing="0" cellpadding="0" border="0" summary=""&gt;
      &lt;div class="xvp"&gt;
      &lt;div&gt;
      &lt;div id="pt1:pc1" class="xpb xph" _afrclmwmn="['c1','c2','c3','c4','c5','c6','c7','c8','c9','c10']" _afrac="pt1:pc1:md1" style="height: 282px;"&gt;
      &lt;div id="pt1:pc1::_ahTp" style="height:auto"&gt;
      &lt;div id="pt1:pc1::_ahCt"&gt;
      &lt;div id="pt1:pc1:md1" class="xpj xpb" _leafcolclientids="['pt1:pc1:md1:c1','pt1:pc1:md1:c2','pt1:pc1:md1:c3','pt1:pc1:md1:c4','pt1:pc1:md1:c5','pt1:pc1:md1:c6','pt1:pc1:md1:c7','pt1:pc1:md1:c8','pt1:pc1:md1:c9','pt1:pc1:md1:c10','pt1:pc1:md1:c11','pt1:pc1:md1:c12']" _afrfilterable="true" _afrautohr="10" _afrhcc="0" _afrpcid="pt1:pc1" tabindex="0" style="height: 234px;"&gt;
      &lt;div id="pt1:pc1:md1::ch" class="xz5" _afrcolcount="12" style="overflow: hidden; position: relative; width: 753px;"&gt;
      &lt;div id="pt1:pc1:md1::db" class="xyy" _afrcolcount="12" style="position: relative; width: 753px; overflow: hidden; height: 170px; z-index: 1;"&gt;
      &lt;table class="xyz xzr" cellspacing="0" _startrow="10" _rowcount="44" style="table-layout:fixed;position:relative;width:1260px;"&gt;
      &lt;tbody&gt;
      &lt;tr class="p_AFFocused p_AFSelected xzn" _afrrk="10"&gt;
      &lt;tr class="xzn" _afrrk="11"&gt;
      &lt;tr class="xzn" _afrrk="12"&gt;
      &lt;tr class="xzn" _afrrk="13"&gt;
      &lt;tr class="xzn" _afrrk="14"&gt;
      &lt;tr class="xzn" _afrrk="15"&gt;
      &lt;tr class="xzn" _afrrk="16"&gt;
      &lt;tr class="xzn" _afrrk="17"&gt;
      &lt;tr class="xzn" _afrrk="18"&gt;
      &lt;tr class="xzn" _afrrk="19"&gt;
      &lt;/tbody&gt;
      &lt;/table&gt;
      &lt;table class="xyz xzr" cellspacing="0" _startrow="20" _rowcount="44" style="table-layout:fixed;position:relative;width:1260px;"&gt;
      &lt;/div&gt;
      &lt;div id="pt1:pc1:md1::sm" class="xzu" style="position: absolute; display: none; z-index: 5000; visibility: visible; top: 120px; right: 25px;"&gt;Fetching Data...&lt;/div&gt;
      &lt;div id="pt1:pc1:md1::ri" class="xz0" style="position:absolute;display:none;overflow:hidden"&gt;&lt;/div&gt;
      &lt;div id="pt1:pc1:md1::dataW" style="display:none"&gt;&lt;/div&gt;
      &lt;div id="pt1:pc1:md1::scroller" tabindex="-1" style="position: absolute; overflow: auto; z-index: 0; width: 770px; top: 46px; height: 187px; right: 0px;"&gt;
      &lt;/div&gt;
      &lt;/div&gt;
      &lt;div id="pt1:pc1::_ahBt" style="height:auto"&gt;
      &lt;div id="pt1:pc1:_clmCxt" style="display:none"&gt;
      &lt;div id="pt1:pc1:_PCPop" style="display:none"&gt;
      &lt;div id="pt1:pc1::_dchDlgC" style="display:none"&gt;
      &lt;/div&gt;
      &lt;/div&gt;
      &lt;/div&gt;
      &lt;/div&gt;
      &lt;div id="pt1:ph2" class="x6v"&gt;
      &lt;/span&gt;
      &lt;/div&gt;
      &lt;/div&gt;
  </code></pre>