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



I have made the recovery scenario in script. When i am exceuting the script. it stop automatically..

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

I have made the recovery scenario in script. When i am exceuting the script. it stop automatically..

Answer / siraj

install script debugger in your system and try again

Is This Answer Correct ?    0 Yes 0 No

Post New Answer

More QTP Interview Questions

Why bpt?

0 Answers  


Suppose I want to use Index value of "WinEdit" in my script .But it is showing None in "Ordinal identifier" value of Testobject Details in the Object Repository.How to enable Ordinal Identifiers to capture the Index value of that particular WinEdit. I have selected "index" and clicked "OK" from Tools-> Object Identification Again I added same WinEdit to the Object repository But I did not get Index value..Please any one help me.How to enable Ordinal indentifiers

1 Answers  


A web page has two butons with same properties and rotating in clockwise direction. how to click on any of the button?

2 Answers   Virtusa,


Can anybody give the script to addsheet, add column,add values under that column in the rows??

5 Answers   AZTEC,


Give me detailed theritical explanation about keyword driven, hybrid framework, environment variables, hybrid frame work

0 Answers   TCS,


I want to write some certification courses, so friends could you guide me? which certification is best and how to write exam and what tutorials need to be studied,what to do first, I am working on automation tool QTP 9.2

0 Answers   Livetek,


when i try to recognise a winmenu item it does not allow me to do that but recognises it as window..i am using qtp 9.2 could someone help with this

3 Answers  


Plz someone tell me about user interface testing and backend testing and hw did u use it in ur project.plz give a detail answer i need to explain it to the interviewer. plzzzzzzzzz guys its urgent

2 Answers  


How many types of recording modes in qtp? Describe each type with an example where we use them?

0 Answers  


How many types of recording modes are there?

0 Answers  


Why do you create a text checkpoint on a Web application? What is the purpose of the Close method?

0 Answers  


What is the difference between property and method?

2 Answers  


Categories