Almost every test object in QTP supports the method CaptureBitmap even the Desktop object.
During your test or within a recovery scenario you want to capture a screenshot of a specific object or the desktop. to later analyze the results.
Posted in Reports

daniva




April 17th, 2008 at 1:58 am
how to use as part od reportmanager???
April 18th, 2008 at 2:13 am
Can you more fully explain this please?
April 21st, 2008 at 10:55 am
This does not work when scripts are run from QC.
The image files cannot be linked if the different machine is used for viewing the logs other than the machine which ran the test.
April 30th, 2008 at 4:27 pm
I tried this with QTP 9.5 and always get a wrong URL in the report for the image :
URL : about:blank’C:\temp\Res1\test.png’
I dont know where this about;blank comes from
Could you please look into this?
May 14th, 2008 at 1:54 am
Image file is not displayed in test results window for QTP 9.5.
June 3rd, 2008 at 11:31 am
Hello,
Why is it displyaing image path starting from “about blank” and followed by the actual path.
That is causing problem for image to display in the report.
Anybody has any solution for this ? Please reply.
Thanks in advance.
June 3rd, 2008 at 11:56 pm
Hi to all
i have read the last comments
and you are right
something works wrong with QTP9.5 and this code.
i am trying to find a solution.
i will publish a solution for 9.5
June 4th, 2008 at 11:14 am
Hello Daniva,
I am working with 9.2 but still facing some issues. After lot of R&D, i found that there is some problem in the string which is assigned to the variable detailsStr.
I have done some changes and now its working fine for me. I guess, it should also work for other members as well. Please replace existing detailsStr variable value with following code –
detailsStr = “Captured Screen shot: “”lt;>”
Please let me know if its working for you.
June 7th, 2008 at 9:58 am
Dani,
I think this approach takes advantage of a security risk of embedding executable HTML code into an input field. I think QTP 9.5 has changed to convert the input data to a display-only non-executing format to mitigate this risk. Recently I sat in on an HP employee who was very adamant about improving security in upcoming releases.
June 9th, 2008 at 10:44 pm
after a reserch
i can tell that this code does not work in QTP9.5
QTP always put the “about:” prefix before the path.
in this way the link is lost inside the reporter.
sorry, i am working with this function almost 2 years…
i have to change it….
June 25th, 2008 at 11:47 am
I see the file is there in the Temp results directory, however getting a red X in the results.
June 26th, 2008 at 12:45 am
Refer to
http://www.advancedqtp.com/forums/index.php/topic,221.msg989.html#msg989