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 to use Environment parameterization? Explain with an example.
HOW AUTOMATE TEST SCRIPT ? what time it will do? after gneration of basic script or Any , Plz explain detailed?
How you can write contexts to text file in qtp?
How to connect to a database?
Explain the concept of object repository?
Can any one explain me what is the procedure to connect the remote desk by using QTP 9.2 ?
What is business process testing(bpt) in qtp?
How to associate shared object repository to test in qtp?
How to creating an output value using quicktest professional (qtp)?
Could i know how how to explain keyword driven framework in interview? If any body knows plz send the explanation.
What is the synchronization point in qtp?
What are private functions in QTP? How they can be called from the function library?
What are the things(properties, and other details) will be recorded while recording an object using normal recording?
how can we compare descriptive programing with a regular expression
What is the file extension of the code file and object repository file in QTP?