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 to data driven test for Win objects in QTP ?
An action has both shared and local or associated to it and both have the same object in them. In the test which one will be considered?
What is the syntax to call one action in another?
Can we Test Welcome Screens and Process Images with QTP
what are the critical test cases in crm? tell me atleast 5 critical test cases? what are the critical bug u find out while testing crm domain?
how can i sent QTP results to the Html, notefile ,xl file give me the code using g mail login page
I want to know can we integrate visual source safe tool with QTP and QC for our version controlling process? WE know QTP and QC 10.0 version is having the version control inbuilt in it but I want to know the merits and demerits of the inbuilt version control tool and the visual source safe tool using QTP and QC.
• What type of testing questions will be asked for 2+ yrs exp people in interview?
When using descriptive programming?
In qtp, explain what is keyword driven automation framework?
can i change the runtime properties of an object ? How can i check if a parameter exists in database ?
Explain different recording modes?
how can we do the frame work in qtp
If the weblist is identified as webelement,and by clicking on webelement if the values are displayed,and if the values the values also identified as webelement.then how to fetch the values through script?
What is meant by Step generator?what is the use of this? we have 3 steps know there what r all those.? can u all pls give me clear idea of this