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

write a qtp script to enter user name & password for flight reservation login page from excel sheet

1 Answers  


I want to open a Notepad window without recording a test and I do not want to use System utility Run command as well. How do I do this?

0 Answers  


HOW do we find a datasheet when there are 4 datasheets in data table.this question was asked by covansys interview.

5 Answers   CTS,


can any one tell me what is process metrics and what is product metrics if possible give me example. Thank You

2 Answers  


Synchronozation types in QTP

11 Answers  






what is the frame work your using in automation ?

4 Answers  


Can the mode of object repository be change during run time? Eg. if the mode is per-action during design time can i change it to shared and vice-versa? Any scripting possible?

2 Answers  


Add parameters during time in each row in one column

0 Answers  


How to handle dynamic objects in quicktest professional?

0 Answers  


Presently i am working on QTP 8.2 Version,i want to know features in 9.2 version, because i have not sufficient time to put the effort on the 9.2 version

0 Answers  


How do I generate Test Results window using descriptive method ( run time ) after my test execution process? Please have a look of my below code. ========================================================= Dim qtApp Dim qtTest Dim qtResultsOpt Set qtApp = CreateObject("QuickTest.Application") qtApp.Launch qtApp.Visible = True qtApp.Options.Run.CaptureForTestResults = "Always" qtApp.Options.Run.RunMode = "Fast" qtApp.Options.Run.ViewResults = True qtApp.Open "C:\Automation\Example", True Set qtTest = qtApp.Test qtTest.Settings.Run.OnError = "NextStep" Set qtResultsOpt = CreateObject ("QuickTest.RunResultsOptions") qtResultsOpt.ResultsLocation = "C:\Automation\Example\Res1" qtTest.Run qtResultsOpt MsgBox qtTest.LastRunResults.Status qtTest.Close Set qtResultsOpt = Nothing Set qtTest = Nothing Set qtApp = Nothing ========================================================== This code is working fine, but Test Result window is not displaying after execution. Anybody can please help me regading the same. Thanks Akshaya Madali Capgemini India Pvt Ltd 9823213538

0 Answers   Cap Gemini,


A dialog is diplays " Transaction 254689 has been successfully completed" How to get the transaction ID from the message ?

6 Answers   Virtusa,


Categories