Micro Focus QTP (UFT) Forums
Need QTP to catch a specific error - 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: Need QTP to catch a specific error (/Thread-Need-QTP-to-catch-a-specific-error)



Need QTP to catch a specific error - Cecil - 02-21-2008

Hi

I have a login script, where I have a data table to feed the user Id and the password. What I would like to be able to do is on the table to include the combination of incorrect information (user id and/or password) and want the QTP to check if an expected result for incorrect information is feed in, it will pass the test and go on to next row of data. How can I achieve this?


Cheers
Kathy


RE: Need QTP to catch a specific error - Ankur - 02-21-2008

You need to apply conditional statements over the correct/incorrect values. if correct values are passed (that means no pop up OR error message would be displayed) then go ahead with that row in datatable otherwise select the next row of datatable.

For selecting rows you have different functions available. You can have a look at my QTP blog --> "QTP and Excel" series posts to find the functions.