Highlighted
Absent Member.
Absent Member.
624 views

Quick Test Pro

How can i get a screenshot from quicktest pro, i mean, how to implement this action in the code.
I need to capture a screenshot while an automatic script runs and paste it into a word file or in any file.

Thanks

 

 

P.S. This thread has been moved from Quality Center Support and News Forum to Unified Functional Testing (formerly QTP) News and Support Forum - HP Forums Moderator

0 Likes
3 Replies
Highlighted
Absent Member.
Absent Member.

Re: Quick Test Pro

Are you looking for snapshots during the run that can be stored in the run results? You can set this option manually or through the code.

To set it manually, in QTP choose Tools\Options\Run. You will see a checkbox to set it and a dropdown to determine when to take a snapshot.

Take a look at SnapshotReportMode in the help file to set it programatically. There are other ways to get snapshots, but I find them difficult to implement.
0 Likes
Highlighted
Absent Member.
Absent Member.

Re: Quick Test Pro

I use QTP 9.2 and here you could use the CaptureBitmap method.

object.CaptureBitmap FullFileName, [OverrideExisting]

It can be used for the desktop or a window and takes a path to store the file and an optional boolean for overwriting, as arguments.

It can save in the bmp or png format. Png often creates files with 1/10 of the size, but can not always openable by older programs.

For more information see the QTP-helpfile

brgds /ola
Highlighted
Absent Member.
Absent Member.

Re: Quick Test Pro

Solved
0 Likes
The opinions expressed above are the personal opinions of the authors, not of Micro Focus. By using this site, you accept the Terms of Use and Rules of Participation. Certain versions of content ("Material") accessible here may contain branding from Hewlett-Packard Company (now HP Inc.) and Hewlett Packard Enterprise Company. As of September 1, 2017, the Material is now offered by Micro Focus, a separately owned and operated company. Any reference to the HP and Hewlett Packard Enterprise/HPE marks is historical in nature, and the HP and Hewlett Packard Enterprise/HPE marks are the property of their respective owners.