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

What is Curd testing?

1886


What is the registration process and examination fees?

559


wht is Manual Testing Frame work. Pls anybody can give appropriate answers

1607


Mention what are the different types of recording modes in qtp? Which will be used when?

566


how will you load the test cases in ddt?

1600






Hi, Hope you viewers are doing fine with good health. What are the steps and connection parameters to connect to Oracle db ? Can you connect with just the Oracle client or Oracle XE ? Cheers!!

2458


I need to pull the data from the page which in row, column vice into excel sheet, how can it be done using QTP? eg: Name Dept xyz gdty i need the same data to be exported in excel sheet.

1729


How to run an integrated test scenario using Multiple Actions? How to use the QTP Step Generator?

3448


How many add-ins comes by default with quicktest professional (qtp)?

566


what r the main attributes of test automation?

1482


Explain about the test fusion report of quicktest professional (qtp)?

545


What are the different recording modes?

568


On what document base Descriptive programming is written if build is not yet ready ?

886


What is smart identification in QTP?

638


hou can we use vb script in qtp could u tell me breafly

1747