LabelWithValue
Class for dynamic values that are shown with a static label. Allows to verify the value with OCR.
Namespace: Progile.TRIO.BaseModel
Assembly: Progile.TRIO.BaseModel (in Progile.TRIO.BaseModel.dll)
Object
Progile.TRIO.BaseModel.OnScreenElement
Progile.TRIO.BaseModel.LabelWithElementBase
Progile.TRIO.BaseModel.LabelWithValue
Initializes a new instance of the LabelWithValue class. If the value is right or left of the label (valuePosition), the gridWidth needs to be set, if it's above or under, the height of the line with the value valueLineHeight needs to be set.
Syntax:
public LabelWithValue(
ITester tester,
string displayName,
RelativePosition valuePosition,
ImageReference imageReferenceForLabel,
int gridWidth = 0,
int valueLineHeight = 0,
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). |
valuePosition | |
imageReferenceForLabel | |
[gridWidth] | Type: Int32
The minimum width that contains both the label and the value, typically the width of the UI grid column.
(Note: ensure the width fits with all window sizes that need to be supported) The gridWith needs to be set for valuePosition Left or Right |
[valueLineHeight] | The minimum Height of the line with the value. The lineHeight needs to be set for valuePosition Above or Under |
[filters] | The filters to find the label. |
Exception | Condition |
ArgumentException | valueLineHeight needs to be set if valuePosition is Above or Under;
gridWidth needs to be set if valuePosition is Left or Right |
Syntax:
public LabelWithValue(
ITester tester,
string displayName,
RelativePosition valuePosition,
string searchTextForLabel,
int gridWidth = 0,
int valueLineHeight = 0,
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). |
valuePosition | |
searchTextForLabel | |
[gridWidth] | Type: Int32
The minimum width that contains both the label and the value, typically the width of the UI grid column.
(Note: ensure the width fits with all window sizes that need to be supported) The gridWith needs to be set for valuePosition Left or Right |
[valueLineHeight] | The minimum Height of the line with the value. The lineHeight needs to be set for valuePosition Above or Under |
[filters] | The filters to find the label. |
Exception | Condition |
ArgumentException | valueLineHeight needs to be set if valuePosition is Above or Under;
gridWidth needs to be set if valuePosition is Left or Right |
Name | Description |
Reads the value in the specified searchRectangle using OCR. | |
Verifies the dynamic value with OCR, using a rectangle that is determined by the relative position to the static label. | |
Waits for the specified value for the time given in waitTime, if waitTime is not set or default, WaitTimeInSeconds is used. |
Name | Description |
The ocr parameters that are used to verify the value. |
Last modified 2yr ago