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
If I change the property value at runtime is it effect is object repository?
your coming from electrical backgroung..but y ur coming to software side?
How to find the path of folder in which the test is saved in qtp?
can anyone tell me from where i can download qtp demo or crack version
Where you get the run time data table?
Sql questions to find second max salary and how to use joins
Explain the concept of object repository and how QTP recognizes objects?
How many lines of code in each script of QTP?
Have you done batch testing in qtp? If yes how you are doing?
What is object repository in qtp?
how to evalute defects in QTP script?
What are the methods used in UFT to handle exceptions or run-time errors?
describe some problems that u had with automating testing tool?
How to find the length of the string in qtp?
Hi friends did any budy attend accenture system test for qtp? if any budy pls drop questions.not only accenture any other mnc company which you attended system test(QTP)?it may helpful to others also