VbLabel 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 VbLabel test object supports the description properties listed in the table below.

Property Name

Description

abs_x

The object's absolute x-coordinate (left) relative to the screen (in pixels). 0,0 is always the top-left corner of the (primary) monitor.

If you are working with multiple monitors, the coordinate in the secondary monitor is relative to the primary monitor.

For example, given a resolution of 1280 x 1024 in the primary monitor, if the secondary monitor is positioned to the right of the primary monitor, the x-coordinate is 1280 or greater. If the secondary monitor is placed to the left of the primary monitor, the x-coordinate is negative.

abs_y

The object's absolute y-coordinate (top) relative to the screen (in pixels). 0,0 is always the top-left corner of the (primary) monitor.

If you are working with multiple monitors, the coordinate in the secondary monitor is relative to the primary monitor.

For example, given a resolution of 1280x1024 in the primary monitor, if the secondary monitor is positioned below the primary monitor, the y-coordinate is 1024 or greater. If the secondary monitor is placed above the primary monitor, the y-coordinate is negative.

alignment

Indicates the object's alignment or the alignment of the text in the object.

Possible values:

0 (VbLeftJustify): Text is left-aligned.
1 (VbRightJustify):Text is right-aligned.
2 (VbCenter):Text is centered.

AutoSize

Indicates whether the control is automatically resized to display its entire contents.

Possible values:                     
    True
    False (Default)

BackColor

The background color of an object.

BackStyle

Indicates whether the Label control is transparent or opaque.

Possible values:

0: Transparent. Background color and any graphics are visible behind the control.

1: Opaque. The control's BackColor property setting fills the control and obscures any color or graphics behind it.

BorderStyle

The object's border style.

caption

The text displayed in or next to the object.

Class Name

The object's class.

enabled

Indicates whether the object is enabled.

Possible values:                     
    True
    False

FontBold

Indicates whether the font style is bold.

Possible values:                     
    True
    False (Default)

FontItalic

Indicates whether the font style is italic.

Possible values:                     
    True
    False (Default)

FontName

The font used to display text in the control.

FontSize

The size (in points) of the font used for text displayed in the control.

FontStrikethru

Indicates whether the font style is strikethrough.

Possible values:                     
    True
    False (Default)

FontUnderline

Indicates whether the font style is underlined.

Possible values:                     
    True
    False (Default)

ForeColor

The color of the object's text.

height

The object's height (in pixels).

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.

left

The distance between the internal left edge of an object and the left edge of its container.

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.

MousePointer

Indicates the type of mouse pointer displayed when the mouse is over a particular part of an object.

Possible values:

0 (vbDefault): Shape determined by the object.

1 (vbArrow): Arrow.

2 (vbCrosshair): Crosshair pointer.

3 (vbIbeam): I beam.

4 (vbIconPointer): Icon (small square within a square).

5 (vbSizePointer): Size (four-pointed arrow pointing north, south, east, and west).

6 (vbSizeNESW): Size NE SW (double arrow pointing northeast and southwest).

7 (vbSizeNS): Size N S (double arrow pointing north and south).

8 (vbSizeNWSE): Size NW SE (double arrow pointing northwest and southeast).

9 (vbSizeWE): Size W E (double arrow pointing west and east).

10 (vbUpArrow): Up Arrow.

11 (vbHourglass): Hourglass (wait).

12 (vbNoDrop): No Drop.

13 (vbArrowHourglass): Arrow and hourglass.

14 (vbArrowQuestion) Arrow and question mark.

15 (vbSizeAll): Size all.

99 (vbCustom): Custom icon specified by the MouseIcon property.

name

The object's name.

NativeClass

The object's window class name.

RegExpWndClass

The permanent part of the MFC window class.

RegExpWndTitle

The constant part of the window title.

RightToLeft

Indicates the display direction and visual appearance of the text on a bi-directional system.

Possible values:

True: The control runs on a bi-directional platform, such as Hebrew Windows95, and text runs from right to left. The control modifies its behavior, such as putting vertical scroll bars at the left side of a text or list box, putting labels to the right of text boxes.

False: (Default) The control act as though it were running on a non-bidirectional platform, such as English Windows95, and text runs from left to right.

tag

An expression that stores any extra data needed for your program. This property is generally used to identify objects.

TestObjGenType

The object's generic type, for example, text box, list box, or table.

TestObjName

The object's name as it appears in the object repository. This property cannot be used with programmatic descriptions or as a description property for the ChildObjects method.

If the object is not found in the object repository, the TestObjName is defined as follows:

  • If the object is found in the application, UFT One uses the value of the property it normally uses when adding this object to the object repository, surrounded by [ ].

  • If the object is not found in the application, UFT One uses the value of the object's Class Name property, surrounded by [ ].

text

The text associated with the object.

ToolTipText

The text displayed when the mouse pauses over the control.

top

The distance between the internal top edge of an object and the top edge of its container.

UseMnemonic

Indicates whether an ampersand (&) included in the text of the Caption property defines an access key.

Possible values:

True: (Default) Any ampersand appearing in the text of the Caption property causes the character following the ampersand to become an access key. The ampersand itself is not displayed in the interface of the Label control.

False: Any ampersand appearing in the text of the Caption property is displayed as an ampersand in the interface of the Label control.

vbname

The object's name as set by the developer.

vbname path

The full hierarchy of vbname with all parent objects.

visible

Indicates whether the object is visible.

Possible values:                     
    True
    False

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.

width

The object's width (in pixels).

WordWrap

Indicates whether a Label control, with its AutoSize property set to True, expands vertically or horizontally to fit the text specified in its Caption property.

Possible values:

True: The text wraps; the Label control expands or contracts vertically to fit the text and the size of the font. The horizontal size doesn't change.

False: (Default) The text does not wrap; the Label expands or contracts horizontally to fit the length of the text and vertically to fit the size of the font and the number of lines.

x

The object's x-coordinate (left) relative to the parent window (in pixels).

y

The object's y-coordinate (top) relative to the parent window (in pixels).

See also: