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 |
PLEASE TELL ME WHEN DO YOU USE THE OBJECT SPY AT RUN TIME
What are the difference between QTP and Winrunner
How can you connect the database with QTP?
what is the difference between seat and concerent licenses.
What is the use of Accessibility check point?
I am testing a website TheLancet in qtp 9.2 and running a script but its not working.Tell me if m doing anything wrong in the script. If Browser("TheLancet.com - Home Page").Page("TheLancet.com - Home Page").Link("Clinical").exists then msgbox "object exist" Else msgbox"object doesnt exist"
write progamming connecting QTP to database sql? this is question asked by interview? pls any answer this?
Login to flight app, in window flight reservation set the date field and select flyfrom as Frankfurt and verify whether flyto list box has the item FrankFurt, log the results.
hi, for QTP TRAINING......SURESH REDDY SMART SOLUTIONS sr.nagar IS BEST OR NOT? how faculty teaches?
What are the Latest Feature are added In QTP 9.2?
how can I read text in browser and export the same into text file?
What is the method for maximize the application while we using Decriptive programming in QTP?