Open topic with navigation

com.hp.lft.sdk.mobile

## Interface EditField

- All Superinterfaces:
    EnabledProvider, TestObject, TestObjectDescriber, UiObjectBase, WaitUntilEnabledProvider

      public interface EditField
      extends UiObjectBase, TestObject

  An edit object in a mobile application.

- - ### Method Summary

    Methods
    Modifier and Type | Method and Description
    --- | ---
    `boolean` | `isPassword()` Indicates whether this mobile edit object is a password box.
    `void` | `setFocus()` Brings the edit box into focus.
    `void` | `setSecure(String text)` Generate the encoded value using the Password Encoder utility, available from the LeanFT > Tools menu in your IDE or from the Windows Start menu.
    `void` | `setText(String text)` Sets the specified text in the edit box.

    - ### Methods inherited from interface com.hp.lft.sdk.mobile.UiObjectBase

      `getAccessibilityId, getClassName, getContainer, getHint, getLocation, getMobileCenterIndex, getNativeClass, getResourceId, getSize, getText, isCheckable, isChecked, isClickable, isFocusable, isFocused, longPress, longPress, pan, pan, pan, pinch, pinch, swipe, swipe, tap, tap`

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

      `waitUntilEnabled, waitUntilEnabled`

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

      `isEnabled`

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

- - ### Method Detail

    - #### isPassword

          boolean isPassword()
                             throws GeneralLeanFtException

      Indicates whether this mobile edit object is a password box. (Android only)
      Returns:
        true if this mobile edit object is a password box.
      Throws:
        `GeneralLeanFtException` - if error occurs during execution
        `GeneralLeanFtException` - if error occurs during execution

    - #### setText

          void setText(String text)
                       throws GeneralLeanFtException

      Sets the specified text in the edit box.
      Parameters:
        `text` - the text to enter in the edit box.
      Throws:
        `GeneralLeanFtException` - if error occurs during execution

    - #### setSecure

          void setSecure(String text)
                         throws GeneralLeanFtException

      Generate the encoded value using the Password Encoder utility, available from the LeanFT > Tools menu in your IDE or from the Windows Start menu.
      Note: This method enables you to hide passwords displayed on the screen while running or editing a LeanFT test, but it is not intended to be a secure way to protect password information.
      Parameters:
        `text` - the password to enter in the edit box.
      Throws:
        `GeneralLeanFtException` - if error occurs during execution

    - #### setFocus

          void setFocus()
                        throws GeneralLeanFtException

      Brings the edit box into focus.
      Throws:
        `GeneralLeanFtException` - if error occurs during execution