Verifying Appearance Using a Bitmap

When you are using the Classic Agent, use this procedure to compare the actual appearance of an image against a baseline image. Or, use it to verify fonts, color charts, or custom objects.

Note: To verify a bitmap when you are using the Open Agent, you can add the VerifyBitmap method to your script. The VerifyBitmap method is supported for both agents.
  1. Complete the steps in Verifying a Test Case.
  2. On the Verify Window dialog box, click the Bitmap tab and then select the region to update: Entire Window, Client Area of Window (that is, without scroll bar or title bar), or Portion of Window.
  3. In the Bitmap File Name text box, type the full path of the bitmap file that will be created. The default path is based on the current directory. The default file name for the first bitmap is bitmap.bmp. Click Browse if you need help choosing a new path or name.
  4. Click OK. If you selected Entire Window or Client Area of Window, Silk Test Classic captures the bitmap and returns you to your test application. If you selected Portion of Window, position the cursor at the desired location to begin capturing a bitmap. While you press and hold the mouse button, drag the mouse to the screen location where you want to end the capture. Release the mouse button.

    A bitmap comparison will fail if the image being verified does not have the same screen resolution, color, window frame width, and window position as the baseline image.

    Capture the smallest possible region of the image so that your test is comparing only what is relevant.

  5. If you are writing a complete test case, record the cleanup stage and paste the test case into the script. If you have added a verification statement to an existing test case, paste it into your script and close the Record Actions dialog box.