How to capture screen shots when an error occurs?
Answers were Sorted based on User's Feedback
Answer / lak
Objectheirarchy.CaptureBitmap "path"
for ex
to capture any window
Window("Flight Reservation").CaptureBitmap "C:\pic1.bmp"
to capture combo box(tool)
Window("Flight Reservation").WinComboBox("Fly
From:").CaptureBitmap "C:\pic2.bmp"
This is used in QTP.
www.funandknowledge.blogspot.com
Is This Answer Correct ? | 3 Yes | 0 No |
Answer / uday kumar_anem
In QTP8.2, we can choose the run settings
Test -> settings -> Run tab -> set ON save image of desktop
when error occurs checkbox
In QTP 9.2, follow the below navigation:
Tools -> Options -> Run tab -> In the drop down list box "On
Error"(default) is selected for "Save step screen capture
to results"
And even we can also configure, whether we have to proceed
to next step or stop the test execution by following below
navigation:
File Menu -> Settings -> Run Tab -> Choose the required
action from the "Whenever an error occurs during run
session" drop down list box.
Is This Answer Correct ? | 3 Yes | 0 No |
Answer / 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 |
Answer / ram.polavarapu
browser("").page("").webedit("").set"ram@yahoo.com"
browser("").page("").webedit("").set"fbnjvkjnbv"
browser("").page("").webbutton("signin").click
if browser("").page("").exist then
reporter.reportevent 0,"login","login is sucess"
else
browser("").page("").capturebitmap "b.bmp"
reporter.reportevent 1,"login","lgin is not sucess","b1.bmp"
end if
note->give the wrong psw ang you will get the result in
results window
Is This Answer Correct ? | 0 Yes | 0 No |
Answer / laxmi
i am unable to understand can you explain in detail
Is This Answer Correct ? | 0 Yes | 2 No |
What is TD plugin? For what purpose they are used . Ineed to connect QC9.2 with QTP 9.2 . Need to run some scripts IN QTP having the QC connectivity. Pls explain in detailed step Thanks in advnece
Hi All, I am a beginner in QTP and have understood the basics of QTP by going through tutorial. I am trying to Automate a HRMIS application, What is the right approach to Automate this application. Kindly answer. Thanks in advance
IF I SET THE VIRTUAL OBJECT AFTER THAT MAXIMIZE THE APPLICATION THEN QTP SENT ERROR OR EXECUTE SUCCESSFULLY? WHY ?
What r the different filters in defect in quality center
Can we test GUI of the application using QTP.? How.?If possible briefly explain process.?
How do you invoke an application using the step generator in qtp?
How we can do Batch testing in QTP?
Hi Suppose u have complex Test scripts which u vl write first and which u vl execute first
Hi Friends, How many types of Data Bases available in market... What is the diff. while using Syabase and Oracle in a Project... ? and what is the main diff. of Syabase and Oracle databases... ? Thanx in advance..
How to capture a window in qtp or how to take snapshot of any window while writing script in qtp
My company has recently started using Ajax for building UI and QTP is nor recognizing the drop down list for selection.It recognises it as a general Web Element or Web Table. I have added individual selections from the drop down as web Table. It works as long as the page is not refreshed. I need some help and inputs as to how to make QTP recognise a drop down list for selection. Any help will be appreciated.
What does VBS file contain...??? what is VBS file.. ???