How to capture screenshots of Exceptions/Errors during run-
time?

Answers were Sorted based on User's Feedback



How to capture screenshots of Exceptions/Errors during run- time?..

Answer / julia

Hello,

In QTP8.2, we can choose the run setting:
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"

Is This Answer Correct ?    15 Yes 2 No

How to capture screenshots of Exceptions/Errors during run- time?..

Answer / anil

There will be a syntax in QTP for capturing
the Exceptions in Runtime by
if (error occurs...) then
capturebitmapimage("c:\....")
end if

Is This Answer Correct ?    9 Yes 0 No

How to capture screenshots of Exceptions/Errors during run- time?..

Answer / ravi_kanakam

When error occurs you can take screenshot of the desktop
and send the bitmap to result file.

if error occurs then

Desktop.CaptureBitmap("c:\bitmap.bmp")

Reporter.ReportEvent micFail, "Error Name", "&lt;<img
src="c:\bitmap.bmp>"

end if

The above code will send the screen shot to the Result File.

Is This Answer Correct ?    8 Yes 1 No

How to capture screenshots of Exceptions/Errors during run- time?..

Answer / arunsingh

By using object.capturebitmap("c:\snap.bmp")
we can capture the screenshots of any screen at runtime.

Is This Answer Correct ?    6 Yes 0 No

How to capture screenshots of Exceptions/Errors during run- time?..

Answer / srikanth

Thanks Sridhar,

But im asking in QTP through script without tester
interaction

Is This Answer Correct ?    5 Yes 2 No

How to capture screenshots of Exceptions/Errors during run- time?..

Answer / giridhar reddy

if you QTP is associated with Quality Center then it will
take the screen shot automatically by setting an option in
the settings/run... but I am also looking for with out
Quality center I have come across with an option in
checkpoints properties to capture the screen Image... I am
doing some sort of research once I get thru it I will
definetly let you guys know..

Is This Answer Correct ?    2 Yes 1 No

How to capture screenshots of Exceptions/Errors during run- time?..

Answer / dilip

thanks julia

Is This Answer Correct ?    0 Yes 0 No

How to capture screenshots of Exceptions/Errors during run- time?..

Answer / amita

Can any one explain the same with qtp10

Is This Answer Correct ?    0 Yes 0 No

How to capture screenshots of Exceptions/Errors during run- time?..

Answer / mangesh

YOU CHECK IN RESULT OF YOU QTP SCREEN SHOT IS THERE

Is This Answer Correct ?    0 Yes 4 No

How to capture screenshots of Exceptions/Errors during run- time?..

Answer / guest

Hey I don't think that it is possible.
After all QTP is automation tool...it doesn't think like
human brain...you have to feed it all the scenarios,then
only it will follow the instructions.

Go to Tools>Recovery scenario manager : here you can give
the instructions to QPT to respond to errors.

Is This Answer Correct ?    1 Yes 8 No

Post New Answer

More QTP Interview Questions

How many scripts do you write per day. What is the average number of scripts you have written in your recent project

1 Answers   CenturyLink, Optum, Value Labs,


how to load all resource files(function libraries,object repositories etc) into tests without associating them?

1 Answers  


In qtp, explain what is crypt object

0 Answers  


Who is the best faculty for QTP in Hyderabad? Is it Mr. G.C.Reddy, some are referring his name?

21 Answers  


What are the Test design techniques you uses in ur project?

0 Answers   Accenture,






How to use descriptive programming?

0 Answers  


How can I pass values from one action to another in QTP ?

8 Answers   Ordain Solutions,


what are the Tools for version control?

3 Answers  


How to Identify broken links in QTP

2 Answers   Ness Technologies,


in QTP,how to write a descriptive program for "yahoo" or "gmail" Login page

1 Answers  


WHAT IS THE SIZE OF OBJECT REPOSITORY USING IN YOUR COMPANY? Can any body tell me answer of this quation........

11 Answers   Ness Technologies,


Hi, is it possible for recording shortcut key during record session? The application on which I am working is web based application. This application has several shortcut key associated with menu option. I have succesfully recorded all menu option but unable to record shortcut key.

1 Answers  


Categories