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
What are the challenges u faced in testing with crm domain? How u overcome with?
Which environments are supported by hp qtp?
Mention the different actions types of qtp.
Explain the concept of object repository and how quicktest professional recognises objects?
How you can decide which type of object repository you have to use?
What are the 3 main stages involved in testing with qtp?
What is the difference between run time object and test object in QTP?
How to use reporter.report event in qtp ?
Explain the types of object repositorys in qtp?
What is expert view in qtp?
What is reusable action?
How many types of parameters are there?
In an interview, what r the general questions asked in QTP? pls give me anwser to this question?
Does Low-level recording capture mouse movements?
In keyward driven framework what will be the step for yahoo login page ,inbox logout,plz explain in detail