How to handle exceptions in for loop of DDT script.
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 |
what is mean by release in quality center and who will perfom?
what is deployment?and who do deploy in a server, and when ?
3 Answers CTS, Mannar Company,
what is TSL script to connect testdirector through winrunner
How many exceptions are there in winrunner and what are they?
How to check property of specific icon is highlighted or not?
Please give an example for test case.
Can anyone explain me abt Winrunner Automation framework in detail and what r the steps involved in it
is there any winrunner function which will allow me to send my user defined message to the test result window. i mean to say is there something similar to msgbox(that we use in qtp)in wr? the wr function i want to know is other then report_msg and tl_step.
What are the virtual objects and how do you learn them?
Tell me the Script to close winrunner from the script itself..
Without the gui map, use the phy desc directly?
What is T_Exit and T_return?