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 can I find out the cursor position through QTP suppose I am keep tabbing(Pressing the tab key continuously) and stoped at a position Now I want to find out where the cursor position is
What VBScript operators, functions, and statements do you use in QuickTest Professional?
QTP script is not working on other's machine..
am not having intrest in coding lang like c c++ java etc can i choose Testing tools as my carrier and please suggest me which tool is good (suitable for me)
What is meant by a Check Point in UFT? Also, explain the applicable Check Points.
Can anybody let me know how to test the Drag and drop feature of the column in a .net application...eg..i hav to test the drag and drog feature of a table(swftable) in a application..plze help!!
What is object repository in qtp?
How to replay a script in qtp?
terminal services client
Tell me about your project? please help me how to tell about insurance project
What is the significance of “action 0” in qtp?
what is the diff b/w assistive and mandatary rules of object repository in QTP???
Hi Friends... By using QTP , can we test .net products...and that product supports different languages.. thanx in advance..
Hi! Using Descriptive Programming How do we get Parent object for an object by writing script(DP). Say, i want to get a parent object for a "Link" in a web page by writing script in Descriptive Programming.
What is the difference between run time object and test object?