TextObject description properties

Object description properties can be used in the object repository description, in programmatic descriptions, in checkpoint and output value steps, and as argument values for the GetTOProperty and GetROProperty methods.

The TextObject test object supports the description properties listed in the table below.

Property Name

Description

backgroundcolor*

(UFT One versions 2022 and later)

The background color of the test object image.

The value is a 6-digit hexadecimal color code without a # sign. The first two numbers refer to red, the next two refer to green, and the last two refer to blue.

huethreshold*

(UFT One versions 2022 and later)

The level of change in hue that UFT One ignores when matching the object to the description.

For example, if the value is 10, when identifying the text in an image file, UFT One ignores a difference of 10 between the specified colors and the hues in the image.

Value range: 0 - 180.

Default value: 5

index

The ordinal identifier that UFT One assigns to the object to indicate the order in which the object appears in the code relative to other objects with an otherwise identical description. This property cannot be used with GetROProperty.

Values begin with 0.

isinverted*

(UFT One versions 2022 and later)

Indicates whether the text and background colors are inverted.

Default value: False

Tip: In some cases, if the background color in your image is darker than the text color, setting TextInverted to true can improve text identification

location

The ordinal identifier that UFT One assigns to the object to indicate where the object appears within the window, frame, or dialog box. Values are assigned from top to bottom, and left to right. This property cannot be used with GetROProperty.

Values begin with 0.

text

The text contained in the object.

Note: This property is case-sensitive.

textcolor*

(UFT One versions 2022 and later)

The color of the text contained in the object.

The value is a 6-digit hexadecimal color code without a # sign. The first two numbers refer to red, the next two refer to green, and the last two refer to blue.

visual relations

Represents the test object's visual relations identifier.

Use this property in GetTOProperty and SetTOProperty steps to return or apply a VisualRelationsCollection object for a test object. The VisualRelationsCollection object enables you to retrieve or replace the visual relation identifier settings of a test object during a run session.

Syntax:

SetVRIColl = TestObject.GetTOProperty("visual relations")

TestObject.SetTOProperty "visual relations", VRIColl

For details, see VisualRelationsCollection Object in the Utility section of the Micro Focus UFT One Object Model Reference for GUI Testing.

This property is not listed in the Object Spy. It is not retrieved when you use the GetTOProperties method. It cannot be used in the Object Identification dialog box, the description area of the object repository, checkpoint or output value steps, and so on.

* Note:

  • This property is only supported when you specify ABBYY OCR as the default OCR engine.

  • This property is not listed in the Object Spy or OIC. It cannot be used in the Object Identification dialog box, in the description area of the object repository, or in checkpoint or output value steps.

See also: