LabelWithValue Methods

ReadValue

Reads the value in the searchRectangle determined by the label and the relative position using OCR.

Syntax:

public string ReadValue()

Return Value:

The string read in the searchRectangle.

Exceptions:

Exception

Condition

When the labelWithValue could not be found on the screen.

VerifyValue

Verifies the dynamic value with OCR, using a rectangle that is determined by the relative position to the static label.

Syntax:

public bool VerifyValue(
	string value,
	out string actualValue
)

Parameters:

Parameter

Description

value

Type: String The expected value that is verified.

[actualValue]

Type: String The actual value on the SUT. Will be read from screen if value is not found.

Return Value:

True, if value could be found in the searchRectangle determined by the relative position to the static label.

Exceptions:

Exception

Condition

When the labelWithValue could not be found on the screen.

WaitForValue

Waits for the specified value for the time given in waitTime, if waitTime is not set or default, WaitTimeInSeconds is used.

Syntax:

public bool WaitForValue(
	string value,
	out string actualValue,
	TimeSpan waitTime = default
)

Parameters:

Parameter

Description

value

Type: String The expected value that shall be waited for.

actualValue

Type: String The actual value on the SUT. Will be read from screen after the waitTime if value is not found.

waitTime

Type: TimeSpan The time to wait for value.

Return Value:

True, if value could be found before the end of waitTime in the defined searchRectangle determined by the relative position to the static label.

Exceptions:

Exception

Condition

When the labelWithValue could not be found on the screen.

Last updated