background image
<< Bitmap Tool - Saving captured bitmaps | Bitmap Tool - Comparing bitmaps >>
Bitmap Tool - Using bitmap functions
<< Bitmap Tool - Saving captured bitmaps | Bitmap Tool - Comparing bitmaps >>
User's Guide
413
23 U
SING
THE
W
INDOWS
B
ITMAP
T
OOL
Capturing bitmaps
Note SilkTest uses .rmp for bitmaps that are captured within a
testcase and fail verification.
Capturing bitmaps in
SilkTest
You can compare a baseline bitmap captured in the bitmap tool with one
captured in a SilkTest testcase of your application.
·
If you write testcases by hand, you can use SilkTest's built-in bitmap
functions.
·
If you prefer to record testcases via Record/Testcase, the Verify Window
dialog allows you to record a bitmap-related verification statement.
Using bitmap
functions
CaptureBitmap, SYS_CompareBitmap, WaitBitmap, and VerifyBitmap are
built-in bitmap-related 4Test functions. In particular, VerifyBitmap is useful
for comparing a screen image during the execution of a testcase to a baseline
bitmap created in the bitmap tool. If the comparison fails, SilkTest saves the
actual bitmap in a file. In the following example, the code compares the
testcase bitmap (the baseline) against the bitmap of TestApp captured by
VerifyBitmap:
TestApp.VerifyBitmap ("c:\sample\testbase.bmp")
For a complete description of these functions, see the online Help.
Using Record/
Testcase
Procedure To capture a bitmap during recording:
1
Invoke the dialog by pointing at the object you want to capture and
pressing Ctrl+Alt.
2
Then select the Bitmap tab.
The Bitmap panel shown below is for the document window of the Text
Editor application.
Either baseline
or result bitmap
Unique
.bmp or .dib (Device
Independent Bitmap)
If you are
saving
And you want the file name
to be
Then use this file
extension