title: unable to get the row count and access the table data in a table using webdriver 2.0 (Java)
body: <pre><code> &lt;div id="OmContentSection" class="modified_content ui-content"          role="main" data-role="content" style="padding: 0px;"&gt;     
       &lt;div&gt;
       &lt;div id="positionsContainer" class="WL_watchlist_listitem"&gt;
       &lt;table id="tblMainData" class="WL_watchlist_table" border="0" width="100%" cellspacing="0" cellpadding="0"&gt;
           &lt;tbody id="positionsList"&gt;
           &lt;tr id="A"&gt;
             &lt;td id="A_daysToExpiry" class="fieldRendererText "/&gt;
             &lt;td id="A_targetProfit" class="fieldRendererText "/&gt;
             &lt;td id="A_stopLossPrice" class="fieldRendererText "/&gt;
             &lt;td id="A_note" class="fieldRendererText "/&gt;
             &lt;td id="A markChange" class="fieldRendererText "&gt;-2.13&lt;/td&gt;
             &lt;td id="A_markPercChange" class="fieldRendererText "&gt;-5.18%      &lt;/td&gt;&lt;/tr&gt;
          &lt;tr id="AA"&gt;
          &lt;tr id="AL"&gt;
          &lt;tr id="AR"&gt;
          &lt;tr id="AT"&gt;
          &lt;tr id="AM"&gt;
          &lt;tr id="AT"&gt;
          &lt;tr id="BAC"&gt;
          &lt;tr id="M"&gt;
         &lt;/tbody&gt;
        &lt;/table&gt;
   &lt;/div&gt;
  </code></pre>
  
  <p>
  ` </p>
  
  <p>Below is my code to handle the table data:</p>
  
  <pre><code>   WebElement table = driver.findElement(OH_positions);
  
  
      WebElement tablebody = driver.findElement(By.id("positionsList"));
  
          // Now get all the TR elements from the table
          List&lt;WebElement&gt; allRows = tablebody.findElements(By.tagName("tr"));
          System.out.println("row size :"+allRows.size());
  
          // And iterate over them, getting the cells
          for (WebElement row : allRows) {
              List&lt;WebElement&gt; cells = row.findElements(By.tagName("td"));
              int columncount = cells.size();
              System.out.println("Column size :"+columncount);
              System.out.println("data:"+cells.get(row);
  
  
          }
  </code></pre>
  
  <p>in my code i have tried several ways to identify the table and the rows 
  However i am getting row size as 0 in each instance.Each time I am getting the same response as '0'I don't know how to get this solved.</p>
  
  <p>Assistance is appreciated.</p>