Newbie: How do i count through a webtable to find an entry? - 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: Newbie: How do i count through a webtable to find an entry? (/Thread-Newbie-How-do-i-count-through-a-webtable-to-find-an-entry) |
Newbie: How do i count through a webtable to find an entry? - jove1776 - 08-24-2010 I need to find an entry in a web table but I am new to QTP and not sure how to do this. I have done the following: Code: Dim test1 But I really not sure how to do this, I am complete newbie to vbscripting too. RE: Newbie: How do i count through a webtable to find an entry? - sreekanth chilam - 08-24-2010 Hi, Try with RowCount,ColumnCount methods of WebTable and loop thru the WebTable. Note: Once your expected entry is found, quit out of the loop using "Exit For" statement. Hope you could solve it on your own RE: Newbie: How do i count through a webtable to find an entry? - supputuri - 08-24-2010 Hi, If you want to check the existance of the specific data in the webtable you can use the "GetRowWithCellText" method which will retrive the row number where the data is displayed. Code: For intSearchColumn= 1 to Browser().Page().Frame().WebTable().ColumnCount(1) Please let me know if you need any more information. RE: Newbie: How do i count through a webtable to find an entry? - jove1776 - 08-25-2010 Thanks to the both of you. I managed to figure it out but doing a slightly different way. I have another question about function libraries files to create my own library but will post another thread. Thanks! RE: Newbie: How do i count through a webtable to find an entry? - SRA - 08-27-2010 Hi - I see the VBScript but not QTP. How does QTP use this code? Is it called from a QTP script? Is this code actually in QTP? Sorry but don't see how this code works with QTP. Thanks RE: Newbie: How do i count through a webtable to find an entry? - supputuri - 08-27-2010 HI SRA, we have to place this code in QTP and then execute ..... :-) |