Share this page

com.hp.lft.sdk.sap.gui

## Interface Button

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

      public interface Button
      extends Element

  A button in a SAP GUI for Windows application

- - ### Method Summary

    Modifier and Type | Method and Description
    --- | ---
    `void` | `click()` Clicks the button.
    `java.lang.String` | `getContainerName()` Returns the name of the parent object.
    `java.lang.String` | `getText()` Returns the text associated with the button.
    `java.lang.String` | `getTooltip()` Returns the button's tooltip text.
    `boolean` | `isEnabled()` Indicates whether the button can accept user input.
    `void` | `setFocus()` Sets focus on the button.

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

    - #### getContainerName

          java.lang.String getContainerName()
                                     throws GeneralLeanFtException

      Returns the name of the parent object.
      Returns:
        the name of the parent object.
      Throws:
        `GeneralLeanFtException` - if an error occurs during execution.

    - #### getText

          java.lang.String getText()
                            throws GeneralLeanFtException

      Returns the text associated with the button.
      Returns:
        the text.
      Throws:
        `GeneralLeanFtException` - if an error occurs during execution.

    - #### getTooltip

          java.lang.String getTooltip()
                               throws GeneralLeanFtException

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

    - #### isEnabled

          boolean isEnabled()
                     throws GeneralLeanFtException

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

    - #### click

          void click()
              throws GeneralLeanFtException

      Clicks the button.
      Throws:
        `GeneralLeanFtException` - if an error occurs during execution.

    - #### setFocus

          void setFocus()
                 throws GeneralLeanFtException

      Sets focus on the button.
      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: