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

PLEASE TELL ME WHEN DO YOU USE THE OBJECT SPY AT RUN TIME

4 Answers   Ordain Solutions,


What are the difference between QTP and Winrunner

5 Answers  


How can you connect the database with QTP?

3 Answers  


what is the difference between seat and concerent licenses.

3 Answers   AppLabs, TCS,


What is the use of Accessibility check point?

8 Answers   BirlaSoft,






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"

2 Answers   Rolta,


write progamming connecting QTP to database sql? this is question asked by interview? pls any answer this?

4 Answers   IBM,


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.

1 Answers   Cap Gemini,


hi, for QTP TRAINING......SURESH REDDY SMART SOLUTIONS sr.nagar IS BEST OR NOT? how faculty teaches?

4 Answers   Cap Gemini,


What are the Latest Feature are added In QTP 9.2?

2 Answers   Infotech,


how can I read text in browser and export the same into text file?

5 Answers   HP,


What is the method for maximize the application while we using Decriptive programming in QTP?

3 Answers  


Categories