Open topic with navigation

com.hp.lft.sdk.sap.gui

## Interface Label

- All Superinterfaces:
    Element, LocationInfoProvider, SupportsNativeObject, TestObject, TestObjectDescriber

      public interface Label
      extends Element

  A label control in a SAP GUI for Windows application.

- - ### Method Summary

    Modifier and Type | Method and Description
    --- | ---
    `java.lang.String` | `getIconName()` Returns the name of the icon used in the label.
    `int` | `getMaxLength()` Returns the maximum number of characters that can be displayed in the label.
    `java.lang.String` | `getRelativeId()` Returns the object's unique identifier relative to the parent window ID.
    `java.lang.String` | `getText()` Returns either the text of the label or the icon name.
    `boolean` | `isHighlighted()` Indicates whether the label is highlighted.
    `boolean` | `isNumerical()` Indicates whether the label is a numerical field.
    `void` | `setCursorPosition(int pos)` Sets the position of the cursor within the static text label.
    `void` | `setFocus()` Sets the focus on the static text label.

    - ### Methods inherited from interface com.hp.lft.sdk.sap.gui.Element

      `getId, getName, getType`

    - ### Methods inherited from interface com.hp.lft.sdk.TestObject

      `exists, exists, findChildren, getDescription, getDisplayName, getParent, getSnapshot, getTextLocations, getTextLocations, getVisibleText, getVisibleText, highlight, highlightMatches, setDescription, setDisplayName, verifyImageExists, verifyImageExists, verifyImageMatch, verifyImageMatch, verifyImageMatch, verifyImageMatch, verifyImageMatch, verifyImageMatch, waitUntilExists, waitUntilExists`

    - ### Methods inherited from interface com.hp.lft.sdk.TestObjectDescriber

      `describe`

    - ### Methods inherited from interface com.hp.lft.sdk.LocationInfoProvider

      `getAbsoluteLocation, getLocation, getSize`

    - ### Methods inherited from interface com.hp.lft.sdk.SupportsNativeObject

      `getNativeObject`

- - ### Method Detail

    - #### getText

          java.lang.String getText()
                            throws GeneralLeanFtException

      Returns either the text of the label or the icon name.
      Returns:
        the text or the icon name.
      Throws:
        `GeneralLeanFtException` - if an error occurs during execution.

    - #### isHighlighted

          boolean isHighlighted()
                         throws GeneralLeanFtException

      Indicates whether the label is highlighted.
      Returns:
        true if highlighted.
      Throws:
        `GeneralLeanFtException` - if an error occurs during execution.

    - #### getIconName

          java.lang.String getIconName()
                                throws GeneralLeanFtException

      Returns the name of the icon used in the label.
      Returns:
        the name of the icon.
      Throws:
        `GeneralLeanFtException` - if an error occurs during execution.

    - #### getMaxLength

          int getMaxLength()
                    throws GeneralLeanFtException

      Returns the maximum number of characters that can be displayed in the label.
      Returns:
        the maximum number of characters.
      Throws:
        `GeneralLeanFtException` - if an error occurs during execution.

    - #### isNumerical

          boolean isNumerical()
                       throws GeneralLeanFtException

      Indicates whether the label is a numerical field.
      Returns:
        true if numerical.
      Throws:
        `GeneralLeanFtException` - if an error occurs during execution.

    - #### getRelativeId

          java.lang.String getRelativeId()
                                  throws GeneralLeanFtException

      Returns the object's unique identifier relative to the parent window ID.
      Returns:
        the UID in text format.
      Throws:
        `GeneralLeanFtException` - if an error occurs during execution.

    - #### setCursorPosition

          void setCursorPosition(int pos)
                          throws GeneralLeanFtException

      Sets the position of the cursor within the static text label.
      Parameters:
        `pos` - the 0-based character position.
      Throws:
        `GeneralLeanFtException` - if an error occurs during execution.

    - #### setFocus

          void setFocus()
                 throws GeneralLeanFtException

      Sets the focus on the static text label.
      Throws:
        `GeneralLeanFtException` - if an error occurs during execution.