Checking Area Bitmaps - WinRunner

You can define any rectangular area of the screen and capture it as a bitmap for comparison. The area can be any size: it can be part of a single window, or it can intersect several windows. The rectangle is identified by the coordinates of its upper left and lower right corners, relative to the upper left corner of the window in which the area is located. If the area intersects several windows or is part of a window with no title (for example, a popup window), its coordinates are relative to the entire screen (the root window).

To capture an area of the screen as a bitmap:

  1. Choose Insert > Bitmap Checkpoint > For Screen Area or click the Bitmap Checkpoint for Screen Area button. Alternatively, if you are recording in Analog mode, press the CHECK BITMAP OF SCREEN AREA softkey.

    The WinRunner window is minimized, the mouse pointer becomes a crosshairs pointer, and a help window opens.

  2. Mark the area to be captured: press the left mouse button and drag the mouse pointer until a rectangle encloses the area; then release the mouse button.
  3. Press the right mouse button to complete the operation. WinRunner captures the area and generates a win_check_bitmap statement in your script.

The win_check_bitmap statement for an area of the screen has the following syntax:

win_check_bitmap ( window, bitmap, time, x, y, width, height );

For example, when you define an area to check in the Flight Reservation application, the resulting statement might be:

win_check_bitmap ("Flight Reservation", "Img3", 1, 9, 159, 104, 88);


All rights reserved © 2018 Wisdom IT Services India Pvt. Ltd DMCA.com Protection Status

WinRunner Topics