How to find out row,column values to use GetCellData method - Printable Version +- Micro Focus QTP (UFT) Forums (https://www.learnqtp.com/forums) +-- Forum: Micro Focus UFT (earlier known as QTP) (https://www.learnqtp.com/forums/Forum-Micro-Focus-UFT-earlier-known-as-QTP) +--- Forum: UFT / QTP Beginners (https://www.learnqtp.com/forums/Forum-UFT-QTP-Beginners) +--- Thread: How to find out row,column values to use GetCellData method (/Thread-How-to-find-out-row-column-values-to-use-GetCellData-method) |
How to find out row,column values to use GetCellData method - quickmy - 07-17-2008 I have an application and i am trying to capture a value which is inside the webtable. I am planning to use GetCelldata(row,column). When i try to use object spy on the object to find out the row and column values it doesnt list in either To properties or Ro properties of the object. Please help me how to find row,column values. RE: How to find out row,column values to use GetCellData method - niranjan - 07-17-2008 Usually the columns and rows count either start with 0 or 1. so Trail and error is the best possible method, i guess. RE: How to find out row,column values to use GetCellData method - swame_sp - 07-17-2008 @ Quickmy, can you elaborate ur question please....???? As niranjan said, you can start with 1 (most probably) and put the value in variable and cross check the value in the variable (by "watch"ing the variable) RE: How to find out row,column values to use GetCellData method - quickmy - 07-17-2008 Thank you very much for the reply I was using the previous thread's example appln http://www.seafight.com/ and trying to retrieve Online Now value ie 14.894 I am using Code: strCellData = Browser("Seafight.com – Online").Page("Seafight.com – Online").WebTable("Deutsch").GetCellData(row,column) My doubt was how to decide on the values of row and column, Is it just the guess work? RE: How to find out row,column values to use GetCellData method - swame_sp - 07-17-2008 Hi quickmy, on looking at the link you have provided, the table has 3 columns and 6 rows.... Now either you have two options of hardcoding the value. Either hard code the value of rows and columns. say look for the data in row-2 and col-3 Or else verify for the value "ONLINE NOW:" (which is also hardcoding the data you are looking for) and in that row check for the value in the column 2 or 3. For finding the row value, you need to have a for loop to match the value you need. this either 2 or 3 is a guess.. you have to play around to find it out. Once it is discovered i dont think the column values are going to be changing... only the row values can change... Let me know if you can understand my logic. RE: How to find out row,column values to use GetCellData method - prince3105 - 07-17-2008 Code: TableRowCount = Browser().page().WebTable().RowCount RE: How to find out row,column values to use GetCellData method - quickmy - 07-17-2008 Hi swame_sp,prince3105, Thank you so much for the explanation and the code, i got it right. Here is what i have written Code: RCnt = Browser("Seafight.com – Online").Page("Seafight.com – Online").WebTable("Deutsch").RowCount |