Share this page

com.hp.lft.sdk.java

# Interface Editor

- All Superinterfaces:
    Clickable, DoubleClickable, LocationInfoProvider, SupportsNativeObject, TestObject, TestObjectDescriber, UiObjectBase, VisibleProvider, WaitUntilVisibleProvider, WaitUntilEnabledProvider, EnabledProvider

      public interface Editor
      extends UiObjectBase, TestObject

  A Java edit box.

- - ### Method Summary

    Modifier and Type | Method and Description
    --- | ---
    `void` | `activate()` Activates the edit box.
    `void` | `clickLink(java.lang.String linkName)` Clicks the specified link in the edit box.
    `void` | `delete(int fromLine, int fromCharPos, int toLine, int toCharPos)` Deletes the specified text.
    `java.lang.String` | `getText()` Returns the object's text.
    `void` | `insert(java.lang.String text, int line, int charPos)` Inserts text into the specified location in the edit box.
    `boolean` | `isReadOnly()` Indicates whether the object is read only.
    `void` | `replace(java.lang.String text, int fromLine, int fromCharPos, int toLine, int toCharPos)` Replaces text.
    `void` | `select(int fromLine, int fromCharPos, int toLine, int toCharPos)` Selects text in the edit box.
    `void` | `setCursorPosition(int line, int charPos)` Places the cursor at the specified location in the edit box.
    `void` | `setFocus()` Sets the focus on the edit box.
    `void` | `setSecure(java.lang.String encryptedText)` Sets the encoded value of this edit box.
    `void` | `setText(java.lang.String text)` Sets the text of the edit box.

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

      `createObject, createObject, fireEvent, getAttachedText, getBackgroundColor, getForegroundColor, getLabel, getNativeClass, getObjectName, getObjectProperty, getPath, getStatics, getTagName, isEnabled, isFocused, isVisible, sendKeys, sendKeys`

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

      `click, click, click`

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

      `doubleClick, doubleClick, doubleClick`

    - ### 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.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.WaitUntilEnabledProvider

      `waitUntilEnabled, waitUntilEnabled`

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

      `isEnabled`

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

      `waitUntilVisible, waitUntilVisible`

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

      `isVisible`

- - ### Method Detail

    - #### activate

          void activate()
                 throws GeneralLeanFtException

      Activates the edit box.
      Throws:
        `GeneralLeanFtException` - if an error occurs during execution.

    - #### clickLink

          void clickLink(java.lang.String linkName)
                  throws GeneralLeanFtException

      Clicks the specified link in the edit box.
      Parameters:
        `linkName` - the name of the link to click.
      Throws:
        `GeneralLeanFtException` - if an error occurs during execution.

    - #### delete

          void delete(int fromLine,
                      int fromCharPos,
                      int toLine,
                      int toCharPos)
               throws GeneralLeanFtException

      Deletes the specified text. All positions are 0-based.
      Parameters:
        `fromLine` - the line in which the deletion starts.
        `fromCharPos` - the character position at which the deletion starts in the first line, inclusive.
        `toLine` - the line in which the deletion ends.
        `toCharPos` - the character position at which the deletion ends in the last line, inclusive.
      Throws:
        `GeneralLeanFtException` - if an error occurs during execution.

    - #### insert

          void insert(java.lang.String text,
                      int line,
                      int charPos)
               throws GeneralLeanFtException

      Inserts text into the specified location in the edit box. All positions are 0-based.
      Parameters:
        `text` - the string to insert.
        `line` - the line in which to insert the text.
        `charPos` - the character position at which to insert the text.
      Throws:
        `GeneralLeanFtException` - if an error occurs during execution.

    - #### replace

          void replace(java.lang.String text,
                       int fromLine,
                       int fromCharPos,
                       int toLine,
                       int toCharPos)
                throws GeneralLeanFtException

      Replaces text.
      Parameters:
        `text` - the text that replaces the existing text.
        `fromLine` - the line in which the replacement starts.
        `fromCharPos` - the character position at which the replacement starts in the first line, inclusive.
        `toLine` - the line in which the replacement ends.
        `toCharPos` - the character position at which the replacement ends in the last line, inclusive.
      Throws:
        `GeneralLeanFtException` - if an error occurs during execution.

    - #### setText

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

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

    - #### setFocus

          void setFocus()
                 throws GeneralLeanFtException

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

    - #### setSecure

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

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

    - #### select

          void select(int fromLine,
                      int fromCharPos,
                      int toLine,
                      int toCharPos)
               throws GeneralLeanFtException

      Selects text in the edit box. All positions are 0-based.
      Parameters:
        `fromLine` - the line in which the selection starts.
        `fromCharPos` - the character position at which the selection starts in the first line, inclusive.
        `toLine` - the line in which the selection ends.
        `toCharPos` - the character position at which the selection ends in the last line, inclusive.
      Throws:
        `GeneralLeanFtException` - if an error occurs during execution.

    - #### isReadOnly

          boolean isReadOnly()
                      throws GeneralLeanFtException

      Indicates whether the object is read only.
      Returns:
        true if the object is read only.
      Throws:
        `GeneralLeanFtException` - if an error occurs during execution.

    - #### getText

          java.lang.String getText()
                            throws GeneralLeanFtException

      Returns the object's text.
      Returns:
        the text.
      Throws:
        `GeneralLeanFtException` - if an error occurs during execution.

    - #### setCursorPosition

          void setCursorPosition(int line,
                                 int charPos)
                          throws GeneralLeanFtException

      Places the cursor at the specified location in the edit box. All positions are 0-based.
      Parameters:
        `line` - the line in which the cursor is placed.
        `charPos` - the character position at which the cursor is placed.
      Throws:
        `GeneralLeanFtException` - if an error occurs during execution.

Tips to improve your search results... UFT Developer Java SDK Reference Version 15.0-15.0.2 UFT Developer SDK Reference All View Local Help Center View Online Help Center back Go back in browser history forward Go forward in browser history Remove search highlights next topic Go to next topic previous topic Go to previous topic Print the current topic Version: