Problem with Data Table - 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: Problem with Data Table (/Thread-Problem-with-Data-Table--7646) |
Problem with Data Table - Rakesh Sahukari - 10-14-2013 I am just giving some user credentials in data table and executing the flight application My Data Table look likes below.. Username Password ---------- --------- aaaaa mercury bbbbb testing ccccc mercury Actually the scenario is to check with each of the user credentials & verify whether the user credentials are correct or not. Below is my code... Code: InvokeApplication "C:\Program Files (x86)\HP\QuickTest Professional\samples\flight\app\flight4a.exe" When I am executing the above code,I can able to verify the 1st user credential but after that I am geeting the run time error as 'Column Name Username does not exists' Please find the attached screen shot regarding my error. RE: Problem with Data Table - Sandeep81 - 10-24-2013 Hi, You are getting this error because you are using i in place of sheetid. Since i is changing with every iteration, code is trying to fetch value from a column, in sheet i. You can omit using i and just give only the column name. The best way to do this is: Code: CntDtData=DataTable.GetRowCount RE: Problem with Data Table - Rakesh Sahukari - 10-24-2013 Thanks Sandeep.Its working fine.. |