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

Answer Posted / 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



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What is quicktest professional window?

782


What is exact meaning of Database Checkpoint in QTP 9.2 and what are the different types of the database check points?

2520


How many types of recording modes are there?

821


How you can decide which type of object repository you have to use?

939


Hi we are using QTP9.0 for Seibel Application and this seibel application will give you a popup messagebox which is of web , so qtp takes 3 mins to recognize the messagebox and to click on it , we have more number of messageboxes like this . please suggest me some solution

1912


What is the expert view?

779


What is method name to compare two XML files.

1758


What are test settings and global settings?

830


How you know that a test case is a regression test case

3523


What is a recovery scenario?

840


Mention the test steps of qtp.

769


What are the different recording modes and how do they work?

855


Can any one send me the QTP Basic Coding Samples?

1861


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.

1615


Explain types of output values?

766