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 the use of generate script that is avaliable 3 places(file settings, tools, object identification)
what is the procedure do u follow for writing the test scripts
what is virtual object?
what is the use of Step into option provided in WR?
we have three windows with title(logical description),India.com,Government of India.com,India Inc.com.All three windows have similar properties and object.A test script has to be run on all these windows.what changes will u make in GUI or script so that the script runs succesfully on all these three windows with the least alteration required? Please explain clearly with steps.
How do handle error/exceptions in winrunner.
Let us assume there is a web-table, In this web table we have no.of Rows and Coloumns , in a Row/Coloumn(like 3*2 i.e 3rd row 2nd coloumn)is a weblist , in this web list we have almost 6links , then we click anylink a new window will activated! How can we write the script for ?? in QTP
what is the difference between testlog and testdirector? thank u
what is split function?Give me the syntax?
hi everyone today is the first time i saw this website,and hi iam siraj,iam very impressed by seeing evryones response towards questions,iam a newcomer and i have got tryining in testing can anyone please send me some projects relaited to testing.i know it is very confidential but still if u send it will a great help. my mail id mateen_012005@yahoo.com
Explain the use of test director software?
what is the automation framework?