capture screen

Capture the screen and store as an image file.
NameDescriptionTypeModifier
window

(Optional) TA name of the window.

Interface EntityNone
control

(Optional) TA name of the control.

Interface ElementNone
left

(Optional) Specifies the left border of a rectangular area (referred to as the rect area), relative to the left edge of the active UI element (which is a window, control, or the entire screen, depending on the presence or absence of values in the window and control arguments). The combination of this rect area with the active UI element determines the active area. Scanning for a match with the baseline image is limited to this area (Units: pixels).

Default Value: 0
StringNone
top

(Optional) Specifies the top border of the rect area, relative to the top edge of the active UI element (Units: pixels).

Default Value: 0
StringNone
width

(Optional) Specifies the width of the rect area (Units: pixels).

Default Value: Width of Active UI Element
StringNone
height

(Optional) Specifies the height of the rect area (Units: pixels).

Default Value: Height of Active UI Element
StringNone
image location

Full path of file into which to store the image.

StringNone
None
This action may be used within the following project items: test modules and user-defined actions.
The following settings are applicable to this action: remove double quotes from cells.
                                
                                    	window	control	left	top	width	height	image location
capture screen	view car	car image					D:\images\toyota_prius.bmp
                                
                            
  • A captured image can only be saved as .JPEG, .BMP, or .PNG. Include the desired extension in the file name portion of the image location value.
  • This action is applied to that part of the captured bitmap identified as the active area, with the remainder of the image ignored. The active area is determined by the combination of the window, control arguments, along with the four arguments (left, top, width and height) that define the rect area.
    To begin with, window and control determine the active UI element, which can be a control, window, or the full screen, based on the following rules:
    window argumentcontrol argumentactive UI element is…
    omittedomittedentire screen (i.e., entire captured test image)
    specifiedomittedentire application window
    specifiedspecifiedspecified control
    With the active UI element established, the optional rect area, if defined, specifies a rectangular area relative to the top-left corner of the active UI element (If none of the four rect arguments are specified, the active area is the active UI element itself).

    The above figure illustrates the active area that applies when both the window and control arguments have been specified, establishing the picture control (with the 12 cars) as the active UI element. The values specifying the rect area (left, top, width and height) are such that it covers both a portion of the active UI element as well as an area outside of it. In such a case, the active area is the area of overlap between the active UI element and the rect area.
  • In most cases, the rect area, if specified, defines a sectional area whose borders reside within the active UI element, so that the rect area itself is the active area. But that is not necessarily the case. The following three images illustrate the general case for how the active area is determined when the rect area is specified.

    The general rule for determining the active area is as follows:
    rect area:resulting active area:
    not specifiedthe active UI element
    overlaps the active UI elementthe intersection space (Cases 1 & 2 above)
    no overlap with active UI elementthe active UI element (Case 3 above)
  • Windows platform: Use backward slashes as separators for the path.
  • Linux platform: Use forward slashes as separators for the path (Note that network paths are not supported).
  • This action supports the <ignore> modifier. If the string <ignore> is present as the value of any of the arguments, or any argument contains an expression that evaluates to <ignore>, the action is skipped during execution.

Copyright © 2023 LogiGear Corporation. All rights reserved. LogiGear is a registered trademark, and Action Based Testing and TestArchitect are trademarks of LogiGear Corporation. All other trademarks contained herein are the property of their respective owners.

LogiGear Corporation

1730 S. Amphlett Blvd. Suite 200, San Mateo, CA 94402

Tel: +1(800) 322-0333