capture screen
Name | Description | Type | Modifier |
---|---|---|---|
window | (Optional) TA name of the window. | Interface Entity | None |
control | (Optional) TA name of the control. | Interface Element | None |
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 | String | None |
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 | String | None |
width | (Optional) Specifies the width of the rect area (Units: pixels). Default Value: Width of Active UI Element | String | None |
height | (Optional) Specifies the height of the rect area (Units: pixels). Default Value: Height of Active UI Element | String | None |
image location | Full path of file into which to store the image. | String | None |
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:
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).window argument control argument active UI element is… omitted omitted entire screen (i.e., entire captured test image) specified omitted entire application window specified specified specified control
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 specified the active UI element overlaps the active UI element the intersection space (Cases 1 & 2 above) no overlap with active UI element the 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.