Golgappa.net | Golgappa.org | BagIndia.net | BodyIndia.Com | CabIndia.net | CarsBikes.net | CarsBikes.org | CashIndia.net | ConsumerIndia.net | CookingIndia.net | DataIndia.net | DealIndia.net | EmailIndia.net | FirstTablet.com | FirstTourist.com | ForsaleIndia.net | IndiaBody.Com | IndiaCab.net | IndiaCash.net | IndiaModel.net | KidForum.net | OfficeIndia.net | PaysIndia.com | RestaurantIndia.net | RestaurantsIndia.net | SaleForum.net | SellForum.net | SoldIndia.com | StarIndia.net | TomatoCab.com | TomatoCabs.com | TownIndia.com
Interested to Buy Any Domain ? << Click Here >> for more details...


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):

Steps:
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
exception.

DataTable xl sheet in qtp take the data like this:
UserName
--------
Mercury
mercu

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

what is the extension of default,custom check points ?

2 Answers   FCG,


please tell me how to explain the project by taking any project (like banking product), how to start explaing?what will be the order of priority e.g.,like purpose, modules, HLDs LLDs etc., in testing point of view (as a testengineer). rightnow i can't explain my project though i've done successfully..so plz help me ..

9 Answers   HCL, IBM, ITC Infotech, Raisoni, TCS, Wipro,


1.Can we use multiple excel sheets in winrunner? 2.What is the templet of writing test cases? 3.Which bug tracking tool u r using in u'r company? 4.Can any one give me real time test case format? My mail id id shobha.mar28@gmail.com

3 Answers   Cognizant, Infosys, Kaktus Info Solutions,


what load_dll in winrunner

2 Answers   Sonata,


how u can do parameterization in winrunner? tell me the sample code.

2 Answers   Mastek, MBT,


what is the main diff of Qtp9.2 and 9.5 plz tell me

5 Answers   HCL, IBM,


What is checkpoints?

1 Answers  


What is the difference between writing a function and writing a script?

0 Answers  


How can you do debugging in winrunner?

2 Answers   Logica CMG,


Tell me the Script to close winrunner from the script itself..

1 Answers  


what is test bed

1 Answers   Satyam,


what is modul? and differ btwn testing and debugging

1 Answers  


Categories