I have made the recovery scenario in script. When i am
exceuting the script. it stop automatically after running
recovery scenario. Please tell the resaon?
Answer Posted / manas
Try this method
Function fnRecovery(Object, Method, Arguments, retVal)
'Error Handling Code
End Function
Lets take a example test run error for items or list not
found in dropdown list
Explanation of each argument to fnRecovery is given below:
Object as Object: The object of the current step.
Method as String: The method of the current step.
Arguments as Array: The actual method's arguments.
Result as Integer: The actual method's result.
To handle this scenario, we will use the function below:
Function Recovery_ListItemIsNotFound(Object, Method,
Arguments, retVal)
Dim sAllItems, arrAllItems, intItem
With Object
'Retrieve all items from the Listbox
sAllItems = .GetROProperty("all items")
'Split 'all items' using a delimiter ";" into an
array
arrAllItems = Split(sAllItems, ";")
'Select a random number
intItem = RandomNumber.Value(LBound(arrAllItems),
UBound(arrAllItems))
.Select "#" & intItem
Reporter.ReportEvent
micInfo, "ListItemIsNotFound", "Item: " & .GetROProperty
("value")
End With
End Function
Is This Answer Correct ? | 2 Yes | 0 No |
Post New Answer View All Answers
How you create new action in qtp?
can i change the runtime properties of an object ? How can i check if a parameter exists in database ?
How many number of actions possible in qtp?
Hi All , How can we decicde for pariticular frame(DataDriven or Keword Driven)in Project? Thanks Balaji
How would you directly trigger javascript in a test?
1.Qtp suppots Unix& linx or not 2why qtp suppots shell script.
How to handle dynamic objects in quicktest professional (qtp)?
How to use descriptive programming?
What is a reusable action?
What test you perform mostly? Regression or retesting in your testing process?
What is the virtual object?
How many types of Automation frameworks are there in UFT? Describe them.
How many types of recording modes are there?
Can you write a script to check if the folder exists or not?
How does quicktest professional (qtp) identifies the object in the application?