Micro Focus QTP (UFT) Forums
DP with screenshot in test result - Printable Version

+- Micro Focus QTP (UFT) Forums (https://www.learnqtp.com/forums)
+-- Forum: Micro Focus UFT (earlier known as QTP) (https://www.learnqtp.com/forums/Forum-Micro-Focus-UFT-earlier-known-as-QTP)
+--- Forum: VB Scripting/Descriptive Programming (https://www.learnqtp.com/forums/Forum-VB-Scripting-Descriptive-Programming)
+--- Thread: DP with screenshot in test result (/Thread-DP-with-screenshot-in-test-result)



DP with screenshot in test result - levohoangha - 01-19-2009

Hi

I'm new to QTP and I'm writing a QTP script using DP from scratch.
However, when I run the test, it wont take screenshots in the result like the test created with recording.

I already set Run option to Always take screenshots.

Does anyone know how to make QTP take these screenshots?

Thank you.


RE: DP with screenshot in test result - MR21135 - 01-20-2009

Hi
You will be able to capture an Image using
Code:
Browser("Browser").CaptureBitmap path_error_file,True



RE: DP with screenshot in test result - levohoangha - 01-20-2009

That would works, but I'll have to do that for almost ALL steps of the test.
And they CaptureBitmap path_error_file won't show up in Test Result Viewer.

Any other way?

Thanks.


RE: DP with screenshot in test result - sreekanth chilam - 01-20-2009

Hi,

Navigate to Tools --> Options --> "Run" tab --> Select "Save still image captures to Results" checkbox & select "Always" from dropdownlist --> click "Apply" --> ok.

Save the test & now execute your code & check in the test results.
Now you can see the screenshots for all the steps.


RE: DP with screenshot in test result - levohoangha - 01-21-2009

I did changed "Save still image captures to Results" to "Always"
However, no screenshot taken.
The whole script is DP written for SAP Web Portal.


RE: DP with screenshot in test result - VENKATAREDDY_M - 01-21-2009

HI,
Pls Include this line of code at the start of your script. This should capture snap for each action.

Setting("SnapShotReportMode")=0

Thanks
VENKATA REDDY


RE: DP with screenshot in test result - levohoangha - 01-22-2009

Thank you all for your help.
I tried Setting("SnapShotReportMode")=0
Also didn't work.

I'm guessing because I wrote the script from scratch (no recording)
so there is nothing in the Active Screen window.
Is that correct?


RE: DP with screenshot in test result - VENKATAREDDY_M - 01-22-2009

No.That not correct.QTP will capture snaps during Run even if you didn't record.
Seems some problem with your QTP Settings.

Thanks
VENKATA