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
Plz Explain How to access Or Store Script from VSS? Explain Real time work (qtp) where you store folders and next to how to you access that folders and how you maintain folders in VSS ? What are the Menu's in VSS? Suppose in Manual, by using Checkin Checkout u can access documents. how you access in QTp REal time?
How to capture a window in QTP?
How to remove the associated function library?
How can you give wait up to 10 seconds in qtp?
How does you pass optional arguments in qtp?
How you will rate urself in QTP in the range of 0 to 5
can any body give the banking domain concepts/links
Where we use data driver in qtp?
In qtp, how you can remove the spaces from string?
How to carry out bit map check points in QTP
descriptive program for a yahoo mail that is in yahoo mail suppose check box mailid subject assume it is like this format all things are in webtable the question is suppose some mail ids are there in that mailids i want to select the check box wich is before a@gmail.com and after that i want to click on delete button
What is meant by Output Value in UFT?
Hello Everyone, Please provide me the practical example of business component concept of QTP.Like how to create business component,how to connect the quality center etc.... Thanks in advance, Gaytri
In qtp, how you can exit for loop?
Is it possible to call from one action to another action in qtp?