title: How to loop through a webtable using HP UFT and print the text for each row in column 1 and 2
body: <p>Hello can someone help me loop through a web table using HP UFT to read a WebTable and loop through each row, print the text for each row in column 1 and 2 and finally compare the text to whats on the webpage</p>
  
  <pre><code>Set myTable = Browser("page").Page("activity Center").WebTable("readonlygrid-xxxx")
  
  
  TotalRows =  myTable.RowCount 
  msgbox TotalRows
  Total = 0
  
  
  For i = 2 to TotalRows 
     For x = 2 to TotalRows
  
  strinbx = myTable.GetCellData(i,1)
  strinbx2 = myTable.GetCellData(x,2)
  
  print strinbx &amp; strinbx2
  
  Next
  Next
  </code></pre>