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 do I lauch my test website using code from qtp in different environmet, uat and PPTE?
How to add verification steps to tests?
hi all can anyone explain how to write the code for finding the mandatory columns in table which are having (red*) (red Astrik)
Hi friends I need to know about jubula automation tool. Is anybody know in bangalore where jubula tanning class is going on do let me know. Its urgent for me to learn that tool please help.
What is the syntax to call one script from another? And what can be the syntax to call one “action” in another?
What does mean by Scope of Automation?n How we defined it?
Hi. please provide license key for QTP 9.2, I have windows XP on my machine Thanks in Advance, moreshwar
Suppose I have three hyperlinks with same properties. How to solve this and what are the ways to solve this. we can solve this by using index property but what are the other ways we have have to solve this problem. Login (href: btnlogin.aspx) Login (href: Sourcelogin.aspx) Login (href: homelogin.aspx)
if numbers are always changing write a script for that
How many types of recording facility are available in quicktest professional (qtp)?
how to evalute defects in QTP script?
hi all here i have tab named "Workbench" By clicking on "workbench" tab.it displays 4 tabs like below workbench common cargo commercial charter "common" tab have 10tabs inside,"cargo" tab also haveing 15 tabs inside and remaining two tabs also having few tabs inside. when clicked on "common" tab.it displaying the script like tab("workbench").select"common" if i clicked on "cargo".it displaying the script like tab"workbench_2").select"cargo" if i clicked on "commercial".it displaying the script like tab"workbench_3").select"commercial" if i clicked on "charter".it displaying the script like tab"workbench_4").select"charter" I have used a "FOR LOOP" for common,commercial,cargo,charter tabs.it was stopped at second tab SO, CAN I RECOGNIZE "WORKBENCH_2,_3,_4" AS A SINGLE VARIABLE if not, can anyone plese help me to solve this
What do you to script when objects are removed from application?
Explain about the test fusion report of quicktest professional (qtp)?
Will down time for server and content maintenance/upgrades be allowed? how much?