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

what will be there in keyword view and expert view?

2 Answers  


Explain Checking XML....

1 Answers   Crea,


If you have two monitors one is of 19inch and the 2nd one is of 24inch,if you want to write same QTP script in both the two monitors is there any changes required in the script?

0 Answers   Infosys,


Which scripting language used by quicktest professional?

0 Answers  


explian qtp frame work and what is the use of it? what is the neceecity of this? explian detail?

2 Answers  






When you are running a batch test of 5 scripts and in 2nd script appln crashed, what hpns then?

4 Answers   BirlaSoft,


How many test scenarios you have automated? How many time it will take to execute 30-40 scenarios? What SDLC model you are following? How often you will execute your test scripts? Because of some changes, your test scripts failed? When you will update your test scripts? How much time it will take to update? Do you know how to connect database? Do you know the direct method to count no. of records (or) rows present in record set once query is executed? How will you create the connection string? How did you resolve conflicts present in Object Repository? How good you are in VB? How will you work on Excel Application? How will you select Excel sheet? If you want to select 10 sheets, will you create 10 separate objects? Given string is “abcd”. What are the methods you will use to display “dcba”? Drives script – explain the frameworks? How you are updating results for each test? What is start up, configuration, navigation scripts? If you are not able to understand the application (some module), who will teach you? What test cases to be automated? When to be automated? What is the testing process you are following? What life cycle you are following? When you will use Descriptive Programming? Do you have the permission to add objects into shared object repository? (OR) someone will maintain SOR? Do you know how to add objects into shared object repository? How many test cases you have automated? How much time will it take to execute? What is complex in automation? When you feel automation is complex? Tell me one scenario, the complex functionality you have automated in your project? Excel sheet having some datas and some datas present in the application (in table). How will you compare these two datas? Write code to fetch datas from Excel sheet. Rate yourself in SQL? Display the employee name who is getting maximum salary? sal ID Salary name 001 100 002 500 003 300 ID 001 002 003 Ename A B C Have you written any test cases while you are in Automation? Manual Testing also will you do or you will work only in automation?

0 Answers  


WHAT IS ENVIRONMENT VARIABLES?

6 Answers   Ordain Solutions,


What is the syntax for how to call one script from another?

0 Answers  


Is there anyway to have QTP go into a website and map out every object before I actually record any tests? I basically want to map out a website with all the objects and build a complete repository. The reason is because I'm running into issues with hierarcical objects. for example: Browser("ABC company- Home").Page("ABC company - Home").Link ("About Us").Click Browser("ABC company - Page 2").Page("ABC company - Page 2").Link("About Us").Click Both these links ("objects" and I use that term loosely as I'm trained mostly in OO programming) go to the same place but but the object heirarchies (pages) are different. I want a repository that will find any possible link on any possible page without having to manually record it. Is there a way to do this?

1 Answers  


what are SetToProperty, SetROProperty,GetToproperty scripting?

2 Answers  


How to create an instance in QTP?

1 Answers   Collabera,


Categories