Golgappa.net | Golgappa.org | BagIndia.net | BodyIndia.Com | CabIndia.net | CarsBikes.net | CarsBikes.org | CashIndia.net | ConsumerIndia.net | CookingIndia.net | DataIndia.net | DealIndia.net | EmailIndia.net | FirstTablet.com | FirstTourist.com | ForsaleIndia.net | IndiaBody.Com | IndiaCab.net | IndiaCash.net | IndiaModel.net | KidForum.net | OfficeIndia.net | PaysIndia.com | RestaurantIndia.net | RestaurantsIndia.net | SaleForum.net | SellForum.net | SoldIndia.com | StarIndia.net | TomatoCab.com | TomatoCabs.com | TownIndia.com
Interested to Buy Any Domain ? << Click Here >> for more details...

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

When and why to use descriptive programming?

987


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

7337


Call to copy of an action and call to existing action… i know the diff but in real project how to use..? i want live scenario.pls help me..

1720


Can any suggest me what is exposure testing?

1759


can i compare two databases using QTP ?

2352


What are benefits of qtp?

1047


What is post recovery scenario?

2194


Can QTP be used for GUI testing ?, We are using Java with MySQL and Operating system is Linux. We are NOT using the web.

2392


• What type of testing questions will be asked for 2+ yrs exp people in interview?

1636


.have you ever written compiled module? if yes , tell me about some of the function that you wrote.

2122


why text area checkpoints cannot used for web applications

2321


I want to test my vb.net solution file using qtp. Does Qtp test only .exe file?

2155


Any body have QTP 9.5 licence key. please provide me at madhukar_dec30@yahoo.co.in

1961


How does quicktest professional identifies the object in the application?

934


banking project description for software tester

7421