Follow Our FB Page << >> for Daily Laughter. We Post Funny, Viral, Comedy Videos, Memes, Vines...

How to handle exceptions in for loop of DDT script.

How to handle exceptions in for loop of DDT script...

Answer / maheshqtp

Steps for handle the Exceptions:
1 ways is: Object Repository based Exceptions
2 way is: Descriptive based(VB Script)Exceptions

OR based Exceptions(using tool options):

1. Take the +ve & -ve Test Data in Data Table
2. when ever the -ve data enter on the application at that
time that application was shows the error. Capture this
error window using recovery scenario concept in QTP
Ex: In the Flight Application User Name was accept
only Mercury. If u enter the any other than that at that
time the Flight application was shows error message (ie.
popup window: Enter Valid Password). We need handle this

DataTable xl sheet in qtp take the data like this:

Resources --> Recovery Scenario Manager --> Click on the +
Sumbol --> Select the Pop up window option --> With the hand
icon select the Error Windows: Tittle Name that window name
appears in the text box --> click next and again with hand
icon click the on the error msg which was displayed on the
error window.--> click next
give the scenarion name
give the recovery scenario file name.

Generate the DDT script for execute the Test Data.
Output: now handle the -ve test data.

Descriptive based Exceptions(without qtp tool options):

Use here .exist method for exist that window
.GetROProperty to capture the error message.

If Dialog("Flight Applications").Exist Then
errmsg=Dialog("Flight Applications").GetROProperty("text")
If errmsg = "Enter Valid UserName" Then
Dialog("Flight Applications").WinButton("OK").Click
End If
End If

Like this we can develop the VbScript code without using the
tool options.

Is This Answer Correct ?    0 Yes 0 No

Post New Answer

More WinRunner Interview Questions

Explain data parameterization in winrunner?

0 Answers  

What is the purpose of set_window command?

0 Answers  

What is the definition of function?

1 Answers  

types of testing? and what is mean bvt and bat ? differ btwn bvt and bat pls can anybody post the answer

4 Answers  

which is the latest version in Winrunner

6 Answers  

What is parameterizing?

0 Answers  

Which is the default Record Method for Static Text Object?

8 Answers   Accenture,

What information is contained in the checklist file and in which file expected results are stored?

0 Answers  

what is mean by release in quality center and who will perfom?

0 Answers   Subex,

How will u find Automation Test cases and how to find regression test cases?

4 Answers   TCS,

How do you that one record was entered in to a particular table using winrunner?

3 Answers   BeBo Technologies,

Which function to use to compare the application date with system date?

0 Answers