views:

209

answers:

2
+1  Q: 

QTP_errObject

Hi All:

May I request you to clarify the issue I have with QTP err object.

I am trying to capture the screen shot of an object on which error occured. I use the code object.captureBitmap(filename) to achieve this.

I would like to know if it is possible to get the screen shot of the entire page with the err object higlighted.

Thank you

Warm Regards Anil

+1  A: 

You can get this in your results file. go to tools->options and select the run tab. Check the box "Save still image captures to results" and select either always or for errors. When you run your test it will show the full screen and highlight the object it has a problem with, if it could find it.

tloach
Hi tloach:Thank you for the answer. Since I am using an application and tool independent keyword driven framework, it would be reall helpful if there is a way out to do it externally.Thank you
Are you looking to capture the image outside QTP, or within QTP to a file that can be read without QTP?
tloach
Apologies for being late to replyout side the QTP using VB script function. the issue willbe resolved if there is a way out to get the 'still image' from QTP results to be saved to our disk during run time.
Unfortunately, the results appear to be stored in a form not easily read. The best I can think of otherwise is to drop to manual mode in a recovery scenario, do a screenshot, then open paint and save it. If I get a chance I'll see if I can write up a function to do so...
tloach
Thank you tloach.... I too will try the same.
A: 

Hi Anil,

(if I'm not too late with my reply)

Use CaptureBitmap method for both problem object and parent of the object. Then you can display it in a variety of ways using simple html page automatically generated.

Albert

Albert Gareev