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
How you are developing the script? Using record and play back or manual?
Explain the concept of object repository and how quicktest professional (qtp) recognises objects?
What are private functions in QTP? How they can be called from the function library?
Explain advantages and disadvantages of ddf?
What is business process testing(bpt) in qtp?
Why script error occur in between recording in qtp?
what is command for executing files?
how to test Web application using QTP software
How do you test DLL files using automation Tool QTP?
Hybrid framework supports Descriptive programming. Is it true?
supose i hv to acsess some functionlaties of a test in 1 machin , some part other machin how can acsess?
hi all can anyone explain how to write the code for finding the mandatory columns in table which are having (red*) (red Astrik)
Have you faced any problems with object repository?
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.
What is an optional step in qtp ?