Button

Description

The button class represents one of the most common UI elements, anything that can be clicked to trigger an effect. Not only text buttons fall into this category, but for example icons, tool selections, links, etc.

A Button can be identified either by a text (e.g. the caption of the button) or by one or several images. Often buttons have several states that have different representation in addition to the default look, such as disabled, activated or highlighted. The button class offers to distinguish between theses states by separating the representation images in active and inactive. Then you can use the IsActive or WaitForStatus methods to check for a certain state. There can be also several active and inactive representations of the button, in this case make sure to put the corresponding images in sub-folders and pass the corresponding ImageReferences to the Button constructor.

Button Class

Namespace: Progile.TRIO.BaseModel Assembly: Progile.TRIO.BaseModel (in Progile.TRIO.BaseModel.dll)

Inheritance Hierarchy:

Object Progile.TRIO.BaseModel.OnScreenElement Progile.TRIO.BaseModel.Button

Constructors

Button(ITester, string, ImageReference, bool, IImageFilter[ ])

Creates a new Button instance, that can be found with an image search for the activeImageReference within the provided filters. If button has active and inactive states, use the constructor with both activeImageReference and inactiveImageReference parameters instead.

Syntax:

public Button(
        ITester tester, 
        string displayName, 
        ImageReference activeImageReference, 
        bool useVisualSense, 
        params IImageFilter[] filters
)

Button(ITester, string, ImageReference, ImageReference, bool, IImageFilter[ ])

Creates a new Button instance, that can be found with an image search for either the active or inactive image reference within the provided filters. The active and inactive image references are used to check for the button state with IsActive, WaitForActive and WaitForInactive.

Syntax:

public Button(
        ITester tester, 
        string displayName, 
        ImageReference activeImageReference, 
        ImageReference inactiveImageReference, 
        bool useVisualSense, 
        params IImageFilter[] filters
)

Button(ITester, string, string, bool, IImageFilter[ ])

Creates a new Button instance, that can be found with a text search for searchText within the provided filters.

Syntax:

public Button(
	ITester tester,
	string displayName,
	string searchText,
	bool useVisualSense,
	params IImageFilter[] filters
)

Methods

Properties

Last updated