Open topic with navigation

com.hp.lft.sdk.sap.gui

## Interface EditField

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

      public interface EditField
      extends Element

  An edit field in a SAP GUI for Windows application.

- - ### Method Summary

    Modifier and Type | Method and Description
    --- | ---
    `java.lang.String` | `getAttachedText()` Returns the static text attached to the edit field.
    `java.lang.String` | `getIconName()` Returns the name of the edit field's icon.
    `int` | `getMaxLength()` Returns the maximum number of characters in the edit field.
    `java.lang.String` | `getText()` Returns the string value of the object.
    `boolean` | `isEnabled()` Indicates whether the field can accept user input.
    `boolean` | `isHighlighted()` Indicates whether the edit field is highlighted.
    `boolean` | `isNumerical()` Indicates whether the edit field is a numerical field.
    `boolean` | `isRequired()` Indicates whether the edit field is required.
    `void` | `openPossibleEntries()` Opens the list of possible entries for the edit field.
    `void` | `setCursorPosition(int pos)` Sets the position of the cursor within the edit field.
    `void` | `setFocus()` Sets focus on the edit field.
    `void` | `setSecure(java.lang.String encryptedText)` Sets the encoded value of this edit field.
    `void` | `setText(java.lang.String text)` Sets the text value of the edit field.

    - ### 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`

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

      `waitUntilEnabled, waitUntilEnabled`

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

      `isEnabled`

- - ### Method Detail

    - #### getAttachedText

          java.lang.String getAttachedText()
                                    throws GeneralLeanFtException

      Returns the static text attached to the edit field.
      Returns:
        the static text.
      Throws:
        `GeneralLeanFtException` - if an error occurs during execution.

    - #### isEnabled

          boolean isEnabled()
                     throws GeneralLeanFtException

      Indicates whether the field can accept user input.
      Returns:
        true if enabled.
      Throws:
        `GeneralLeanFtException` - if an error occurs during execution.

    - #### isHighlighted

          boolean isHighlighted()
                         throws GeneralLeanFtException

      Indicates whether the edit field 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 edit field's icon.
      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 in the edit field.
      Returns:
        the maximum number of characters.
      Throws:
        `GeneralLeanFtException` - if an error occurs during execution.

    - #### isNumerical

          boolean isNumerical()
                       throws GeneralLeanFtException

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

    - #### isRequired

          boolean isRequired()
                      throws GeneralLeanFtException

      Indicates whether the edit field is required.
      Returns:
        true if required.
      Throws:
        `GeneralLeanFtException` - if an error occurs during execution.

    - #### getText

          java.lang.String getText()
                            throws GeneralLeanFtException

      Returns the string value of the object.
      Returns:
        the text.
      Throws:
        `GeneralLeanFtException` - if an error occurs during execution.

    - #### openPossibleEntries

          void openPossibleEntries()
                            throws GeneralLeanFtException

      Opens the list of possible entries for the edit field.
      Throws:
        `GeneralLeanFtException` - if an error occurs during execution.

    - #### setText

          void setText(java.lang.String text)
                throws GeneralLeanFtException

      Sets the text value of the edit field.
      Parameters:
        `text` - the text.
      Throws:
        `GeneralLeanFtException` - if an error occurs during execution.

    - #### setCursorPosition

          void setCursorPosition(int pos)
                          throws GeneralLeanFtException

      Sets the position of the cursor within the edit field.
      Parameters:
        `pos` - The 0-based character position.
      Throws:
        `GeneralLeanFtException` - if an error occurs during execution.

    - #### setFocus

          void setFocus()
                 throws GeneralLeanFtException

      Sets focus on the edit field.
      Throws:
        `GeneralLeanFtException` - if an error occurs during execution.

    - #### setSecure

          void setSecure(java.lang.String encryptedText)
                  throws GeneralLeanFtException

      Sets the encoded value of this edit field. The SetSecure method enables you to hide passwords displayed on the screen while running or editing a LeanFT test. However, it is not intended to be a secure way to protect password information.
      Generate the encoded value using the Password Encoder utility (CryptonApp.exe), available in the LeanFT installation\bin folder.
      Parameters:
        `encryptedText` - the encoded text to enter in this edit field.
      Throws:
        `GeneralLeanFtException` - if an error occurs during execution.