Links

Window

Description

A class that represents a standard windows window, with Minimize, Restore, Maximize and Close icons. The class also defines its ScreenSelect based on the definingImage with a floodFill from its hotspot.

Window Class

Namespace: Progile.TRIO.EnvironmentModel Assembly: Progile.TRIO.EnvironmentModel.Windows (in Progile.TRIO.EnvironmentModel.Windows.dll)

Inheritance Hierarchy:

Constructors

Syntax:
public Window(
ITester t,
ISystemHelpers systemHelpers,
string displayName,
ImageReference definingImage
)
Parameter
Description
t
Type: ITester
The tester interface.
systemHelper
An instance of the ISystemHelpers interface that allows interaction with the SUT operating system.
displayName
Type: String The name of the window that will be used for logging and reporting of exceptions (customer facing).
definingImage
Type: ImageReference The image that is used to identify if the window is shown on the screen. This image is also used to define the ScreenSelect of the Window based on a floodFill from its hotspot. A good option for many winows is to take the icon shown in the top left of the image (but make sure Hotspot is outside the icon).

Methods

Name
Description
Closes the window by clicking the close icon. Does not handle any dialogs (e.g. save request) that might pop up.
Maximizes the window by clicking the maximize icon. Redefines the ScreenSelect after maximizing. If maximize icon is not shown, method assumes the window is already maximized and doesn't do anything.
Minimizes the window by clicking the minimize icon.
Restores the window by clicking the restore icon. Redefines the ScreenSelect after restoring. If restore icon is not shown, method assumes the window is already restored and doesn't do anything.

Properties

Name
Description
CloseIcon
The icon to close the window.
The tolerance to use in the SelectFromColorAtPoint method when defining the ScreenSelect. Default is 0.2, which allows the floodFill algorithm to pass through most standard windows but is stopped by the border around the window.
MaxIcon
The icon to maximize the window.
MinIcon
The icon to minimize the window.
The icon to restore the window.