Checkbox
The checkbox class represents a simple checkbox ui element that can be either in state "checked" or "unchecked" and can toggle between the two by clicking into the checkbox. In order to distinguish between the two states, both representations ("checkedImageReference" and "uncheckedImageReference") need to be provided in the constructor.
For many software models there will be many checkbox used in the UI, but they all look the same. For this it makes sense to place the image representations in a common folder and refer to this for all checkboxes.
If there is more than one checkbox on a given screen and the model needs to be able to distinguish between them, then you should use the LabelWithCheckbox class that allows to identify a checkbox based on its label.
Namespace: Progile.TRIO.BaseModel
Assembly: Progile.TRIO.BaseModel (in Progile.TRIO.BaseModel.dll)
Creates a new Checkbox instance, that can be found within the provided Select filter. Both checkedImageReference and uncheckedImageReference are required.
Syntax:
public Checkbox(
ITester tester,
string displayName,
ImageReference checkedImageReference,
ImageReference uncheckedImageReference,
params IImageFilter[] filters
)
Parameter | Description |
tester | The tester interface. |
displayName | Type: String
The name of the element that will be used for logging and reporting of exceptions (customer facing). |
checkedImageReference | Type: ImageReference
The image reference for the checked representation. This or the uncheckedImgRef will be used to locate the checkbox. |
uncheckedImageReference | Type: ImageReference
The image reference for the unchecked representation. This or the checkedImgRef will be used to locate the checkbox. |
[filters] | Type: IImageFilter[ ]
Typically a Select filter indicating the area of interest for the image searches. |
Name | Description |
Checks the checkbox if it is not already in the correct state. Else it logs that nothing was done. | |
Returns true if the image checked can be found, false if unchecked can be found and throws an exception if neither one or the other can be found. | |
Unchecks the checkbox if it is not already in the correct state. Else it logs that nothing was done. |
Last modified 2yr ago