Share this page

com.hp.lft.sdk.java

# Interface UiObjectBase

- All Superinterfaces:
    Clickable, DoubleClickable, LocationInfoProvider, SupportsNativeObject, VisibleProvider, WaitUntilVisibleProvider, WaitUntilEnabledProvider, EnabledProvider
  All Known Subinterfaces:
    Applet, Button, Calendar, CheckBox, Dialog, Editor, ExpandBar, InternalFrame, Label, Link, List, Menu, RadioButton, Slider, SpinBox, TabControl, Table, ToolBar, TreeView, TreeViewTable, UiObject, Window

      public interface UiObjectBase
      extends Clickable, DoubleClickable, LocationInfoProvider, SupportsNativeObject

  Base interface of all Java test objects.

- - ### Method Summary

    Modifier and Type | Method and Description
    --- | ---
    `NativeObject` | `createObject(String className)` Creates a NativeObject wrapping an instance of a Java object within your application.
    `NativeObject` | `createObject(String className, Object... arguments)` Creates a NativeObject wrapping an instance of a Java object within your application.
    `void` | `fireEvent(EventInfo eventInfo)` Triggers an event on the test object.
    `java.lang.String` | `getAttachedText()` Returns the static text attached to this object.
    `java.lang.String` | `getBackgroundColor()` Returns the object's background color.
    `java.lang.String` | `getForegroundColor()` Returns the object's foreground color.
    `java.lang.String` | `getLabel()` Returns the object's label.
    `java.lang.String` | `getNativeClass()` Returns the object's Java class name.
    `java.lang.String` | `getObjectName()` Returns test object's ObjectName.
    `<TValue> TValue` | `getObjectProperty(String propname, java.lang.Class<TValue> returnType)` Returns the value of a test object property.
    `java.lang.String` | `getPath()` Returns the object's hierarchy (object ancestors).
    `NativeObject` | `getStatics(String className)` Gets a native object wrapping a Java class capable of accessing static members (methods and fields) of the specified Java class.
    `java.lang.String` | `getTagName()` Returns the object's Java name.
    `boolean` | `isEnabled()` Indicates whether this object is enabled.
    `boolean` | `isFocused()` Indicates whether this object has the focus.
    `boolean` | `isVisible()` Indicates whether this object is visible.
    `void` | `sendKeys(String input)` Types the specified string into the object in the application.
    `void` | `sendKeys(String input, java.util.EnumSet<KeyModifier> modifiers)` Types the specified string into the test object, including special keys or key modifiers.

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

    - #### isEnabled

          boolean isEnabled()
                     throws GeneralLeanFtException

      Indicates whether this object is enabled.
      Returns:
        true if object enabled.
      Throws:
        `GeneralLeanFtException` - if an error occurs during execution.

    - #### isFocused

          boolean isFocused()
                     throws GeneralLeanFtException

      Indicates whether this object has the focus.
      Returns:
        true if has focus.
      Throws:
        `GeneralLeanFtException` - if an error occurs during execution.

    - #### isVisible

          boolean isVisible()
                     throws GeneralLeanFtException

      Indicates whether this object is visible.
      Returns:
        true if visible.
      Throws:
        `GeneralLeanFtException` - if an error occurs during execution.

    - #### fireEvent

          void fireEvent(EventInfo eventInfo)
                  throws GeneralLeanFtException

      Triggers an event on the test object.
      Parameters:
        `eventInfo` - Use the `EventInfoFactory` class to generate the eventInfo argument value.
      Throws:
        `GeneralLeanFtException` - if an error occurs during execution.

    - #### getAttachedText

          java.lang.String getAttachedText()
                                    throws GeneralLeanFtException

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

    - #### getBackgroundColor

          java.lang.String getBackgroundColor()
                                       throws GeneralLeanFtException

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

    - #### getForegroundColor

          java.lang.String getForegroundColor()
                                       throws GeneralLeanFtException

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

    - #### getObjectName

          java.lang.String getObjectName()
                                  throws GeneralLeanFtException

      Returns test object's ObjectName. Given the statement "EditBox newEditBox = new EditBox(0,0)", the object name is "newEditBox".
      Returns:
        the instance variable name.
      Throws:
        `GeneralLeanFtException` - if an error occurs during execution.

    - #### getLabel

          java.lang.String getLabel()
                             throws GeneralLeanFtException

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

    - #### getPath

          java.lang.String getPath()
                            throws GeneralLeanFtException

      Returns the object's hierarchy (object ancestors).
      Returns:
        the object's hierarchy (object ancestors).
      Throws:
        `GeneralLeanFtException` - if an error occurs during execution.

    - #### getTagName

          java.lang.String getTagName()
                               throws GeneralLeanFtException

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

    - #### getNativeClass

          java.lang.String getNativeClass()
                                   throws GeneralLeanFtException

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

    - #### sendKeys

          void sendKeys(java.lang.String input,
                        java.util.EnumSet<KeyModifier> modifiers)
                 throws GeneralLeanFtException

      Types the specified string into the test object, including special keys or key modifiers.
      Parameters:
        `input` - the string to type in the object. The string can include constants from the `Keys` class.
        `modifiers` - a mask of values indicating keys to be pressed and held while the specified string is entered. For the list of modifiers, see documentation for java.awt.event.InputEvent.
        The keys are released when the SendKeys step is finished.
        The WINDOWS_LOGO modifier is not supported in Java test objects.
      Throws:
        `GeneralLeanFtException` - if an error occurs during execution.

    - #### sendKeys

          void sendKeys(java.lang.String input)
                 throws GeneralLeanFtException

      Types the specified string into the object in the application.
      Parameters:
        `input` - the string to type in the object. The string can include constants from the `Keys` class.
      Throws:
        `GeneralLeanFtException` - if an error occurs during execution.

    - #### createObject

          NativeObject createObject(java.lang.String className)
          		throws GeneralLeanFtException

      Creates a NativeObject wrapping an instance of a Java object within your application.
      Parameters:
        `className` - the java class name whose static members you want to access.
      Returns:
        a NativeObject wrapping a Java class capable of accessing static members within your application.
      Throws:
        `GeneralLeanFtException` - if an error occurs during execution.

    - #### createObject

          NativeObject createObject(java.lang.String className, Object... arguments)
          										throws GeneralLeanFtException

      Creates a NativeObject wrapping an instance of a Java object within your application.
      Parameters:
        `className` - the java class name whose static members you want to access.
        `arguments` - any arguments required for the object's constructor.
      Returns:
        a NativeObject wrapping a Java class capable of accessing static members within your application.
      Throws:
        `GeneralLeanFtException` - if an error occurs during execution.

    - #### getStatics

          NativeObject getStatics(java.lang.String className)
          		throws GeneralLeanFtException

      Gets a native object wrapping a Java class capable of accessing static members (methods and fields) of the specified Java class.
      Parameters:
        `input` - the java class name whose static members you want to access.
      Returns:
        a NativeObject wrapping a Java class capable of accessing static members within your application.
      Throws:
        `GeneralLeanFtException` - if an error occurs during execution.

    - #### getObjectProperty

          <TValue> TValue getObjectProperty(java.lang.String propname,
                                            Class<TValue> returnType)
          		throws GeneralLeanFtException

      Returns the value of a test object property.
      This method can return any property of this control, including custom properties declared in a custom control.
      Type Parameters:
        `TValue` - the generic type of returnType.
      Parameters:
        `propname` - the name of the test object property to return.
        `returnType` - the type of the test object property to return.
      Returns:
        the property value
      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: