Having problems with your account or logging in?
A lot of changes are happening in the community right now. Some may affect you. READ MORE HERE

Why does SilkTest CaptureBitmap() give a "Bitmap did not stabilize" error?

Why does SilkTest CaptureBitmap() give a "Bitmap did not stabilize" error?

The CaptureBitmap() method captures consecutive bitmaps until a number of them all match, thus ensuring that the captured bitmap is "stable"or has finished rendering to the screen. Dependent on the performance of the machine this can lead to the problem, that the bitmap does not stabilize (due to permanently changing portions of the desktop). Sometimes a portion of a window is constantly changing, therefore CaptureBitmap() will always give a "Bitmap did not stabilize" error. Below are some approaches to working around this problem.


Suggestions:

1) If an outer part of the window, which can be excluded is constantly changing, you can call CaptureBitmap using the following syntax, for example: 

(sBitmapDir = window.CaptureBitmap (sBitmapFile [, Rect])),

and exclude the changing portion of the window by specifying the coordinates to capture with the argument Rect, which is of the RECT data type. RECT is the coordinates for the capture region, relative to the window. If you omit Rect, CaptureBitmap captures the entire window. More information on this step is available in the SilkTest Help file.

2) If only a small portion of the window changes, then increase the comparison tolerance so that it is larger than the area that changes. You can do this globally from within SilkTest by going to Options | Agent | Bitmap tab and increasing "BITMAP_PIXEL_TOLERANCE (pixels)". This option can also be set in your testcase/function by calling: Agent.SetOption (OPT_BITMAP_PIXEL_TOLERANCE, ).

3) If you cannot exclude the changing portion of the window, then reduce the option BITMAP_MATCH_COUNT to 0, which is the number of consecutive bitmaps that must match, when set to 0, no bitmap matching is performed during capture. You can do this globally from within SilkTest by going to Options | Agent | Bitmap tab and setting "BITMAP_MATCH_COUNT" to 0 or from within your testcase/function by calling: Agent.SetOption (OPT_BITMAP_MATCH_COUNT, 0).

4) Change the Agent default setting for BITMAP_MATCH_INTERVAL (default is 0.1 -> e.g. set to 5 to increase the time interval between snapshots to use for ensuring the stability of the bitmap image)

DISCLAIMER:

Some content on Community Tips & Information pages is not officially supported by Micro Focus. Please refer to our Terms of Use for more detail.
Top Contributors
Version history
Revision #:
1 of 1
Last update:
‎2013-02-15 19:34
Updated by:
 
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.