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?
Answers were Sorted based on User's Feedback
Answer / 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 |
What are SetToProperty, SetRoProperty, GetToProperty scripting?
Hi, I Would Like to Know which is the Best QTP Certification Training Institute in Hyd? Thanks in Advance kishan
How to use the object spy in quicktest professional 8.0 version?
What is the parameterization? Give one example?
what is a active x control?can any one brief me about active x controls
What are some test assets and related extensions of qtp?
Explain how you can find the absolute value of the number in qtp?
QTP is used better in which type of application Web based application or desktop application
We have 10 rows of records in data table, but we have to run 4th, 5th and 6th rows only. How can we handle this scenario in QTP?
5 Answers Accenture, Banca Sella, Polaris,
How to check and display a particular word from a paragraph?
In the website, the protocol has been changed http: to https what you will do? Tell me your approach?
Hi guys i'm prepareing for interview question for qtp i don't have bayground for vb scipt language can any one tell me it is easy to do job in qtp without bayground.