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

can anyone tell me from where i can download qtp demo or crack version

1631


what is meant by Implicit and explicit requirements?

3631


What is the expert view?

559


When QTP object wait time is 10 seconds, and in test script wait time is 5 seconds and in function library wait time is 2 seconds how much time does the wait occur? or which is given priority.

1640


What is system testing and what are the different types of tests you perform in system testing?

605






What is the architecture of your project? Can any one answer for this question plz........

1416


how can i call function (which has link with excell sheet at a remote location) within another function

1582


How to create scenario selector

1493


assume i have few url link how will i dynamically call then using descriptive programming?

1607


Is any limitation to xml checkpoints?

569


1 Folders in VSS 2 In navigation script there are 100 script i want to run first 50 and 37th script also not needed to run how to do this 3 What is navigation script,Driver script, business script what we are loaded in this script 4 use of resource tab 5 Difference between verification and validation give real scenario example 6 file scripting object when to use it 7 what are the problems you are faced while testing web application 8 difference between expert view and keyword view 9 difference between QTP 8.2 and QTP 9.2 navigation frame work please answer these questions from real time working people as early as possible

1622


what is the mail use of frame work(with detail). architecture for keyword driven frame work

1429


What is the difference between run time object and test object?

591


Mention the test steps of qtp.

548


write a script for allinterview-submit Question first we've to select Choose Category,second select Sub- Category(Which is comes in to runtime)third select Question Type.for that give some descriptive and vb script

1367