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...

How to capture screen shots when an error occurs?

Answer Posted / deepak k

Hi use RecoveryFunction to capture the image when error
ocours.

Step1: Create a VBS file using following founction
Function RecoveryFunction1(Object, Method, Arguments,
retVal)

'Find the Test Folder Path
Set qtApp = CreateObject("QuickTest.Application")
testpath = qtApp.Folders.item(1)
'stores the image inside the test folder
image_name= testpath &"\imagename.png"
Desktop.CaptureBitmap image_name
End Function

Step2: Go to Recovery manager
step3: select "On Any error" or select u r own option
Step4: select function to call
step5: call the above mentioned file

Rest QTP will do it for you

Is This Answer Correct ?    2 Yes 1 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

How you are developing the script? Using record and play back or manual?

1010


Explain the concept of object repository and how quicktest professional (qtp) recognises objects?

1017


What are private functions in QTP? How they can be called from the function library?

991


Explain advantages and disadvantages of ddf?

1017


What is business process testing(bpt) in qtp?

1085


Why script error occur in between recording in qtp?

2234


what is command for executing files?

1968


how to test Web application using QTP software

1977


How do you test DLL files using automation Tool QTP?

3196


Hybrid framework supports Descriptive programming. Is it true?

1110


supose i hv to acsess some functionlaties of a test in 1 machin , some part other machin how can acsess?

1759


hi all can anyone explain how to write the code for finding the mandatory columns in table which are having (red*) (red Astrik)

1819


Have you faced any problems with object repository?

1021


Excel sheet having some datas and some datas present in the application (in table). How will you compare these two datas? Write code to fetch datas from Excel sheet.

1938


What is an optional step in qtp ?

1134