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


Please Help Members By Posting Answers For Below Questions

How you create new action in qtp?

786


can i change the runtime properties of an object ? How can i check if a parameter exists in database ?

1637


How many number of actions possible in qtp?

781


Hi All , How can we decicde for pariticular frame(DataDriven or Keword Driven)in Project? Thanks Balaji

1574


How would you directly trigger javascript in a test?

1647


1.Qtp suppots Unix& linx or not 2why qtp suppots shell script.

1889


How to handle dynamic objects in quicktest professional (qtp)?

726


How to use descriptive programming?

845


What is a reusable action?

735


What test you perform mostly? Regression or retesting in your testing process?

782


What is the virtual object?

864


How many types of Automation frameworks are there in UFT? Describe them.

749


How many types of recording modes are there?

775


Can you write a script to check if the folder exists or not?

712


How does quicktest professional (qtp) identifies the object in the application?

755