Share this page

com.hp.lft.sdk.sap.gui

## Interface Window

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

      public interface Window
      extends Element

  A window or dialog box containing objects in a SAP GUI for Windows application.

- - ### Method Summary

    Modifier and Type | Method and Description
    --- | ---
    `void` | `activate()` Activates the SAP window.
    `void` | `close()` Closes the window or dialog box in a SAP GUI for Windows application.
    `java.lang.String` | `getProgram()` Returns the name of the SAP source program that is executing.
    `long` | `getScreenNumber()` Returns the number of the displayed screen.
    `java.lang.String` | `getText()` Returns the text associated with the object.
    `java.lang.String` | `getTransaction()` Returns the transaction the user is executing.
    `java.awt.Dimension` | `getWorkingPaneSize()` Returns the size of the working pane in character metric.
    `boolean` | `isMinimized()` Indicates whether the object is minimized.
    `void` | `maximize()` Maximizes the window or dialog box.
    `void` | `resize(java.awt.Dimension size)` Resizes the window so that the available working area has the specified width and height in character metric.
    `void` | `resize(int width, int height)` Resizes the window to the specified dimensions.
    `void` | `restore()` Restores a maximized window or dialog box to its original size.
    `void` | `scroll(ScrollOrientation orientation, int toPos)` Sets the position of the scroll bars.
    `void` | `selectMenuItemById(java.lang.String menuItemId)` Selects an item from a context menu.
    `void` | `sendKey(SapFunctionKey key)` Presses a non-printing key or key combination.

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

- - ### Method Detail

    - #### getText

          java.lang.String getText()
                            throws GeneralLeanFtException

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

    - #### getWorkingPaneSize

          java.awt.Dimension getWorkingPaneSize()
                                         throws GeneralLeanFtException

      Returns the size of the working pane in character metric. The working pane is the area between the toolbar and the status bar.
      Returns:
        the size of the working pane.
      Throws:
        `GeneralLeanFtException` - if an error occurs during execution.

    - #### isMinimized

          boolean isMinimized()
                       throws GeneralLeanFtException

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

    - #### getTransaction

          java.lang.String getTransaction()
                                   throws GeneralLeanFtException

      Returns the transaction the user is executing.
      Returns:
        the transaction.
      Throws:
        `GeneralLeanFtException` - if an error occurs during execution.

    - #### getScreenNumber

          long getScreenNumber()
                        throws GeneralLeanFtException

      Returns the number of the displayed screen.
      Returns:
        the number of the screen.
      Throws:
        `GeneralLeanFtException` - if an error occurs during execution.

    - #### getProgram

          java.lang.String getProgram()
                               throws GeneralLeanFtException

      Returns the name of the SAP source program that is executing.
      Returns:
        the name of the program.
      Throws:
        `GeneralLeanFtException` - if an error occurs during execution.

    - #### scroll

          void scroll(ScrollOrientation orientation,
                      int toPos)
               throws GeneralLeanFtException

      Sets the position of the scroll bars.
      Parameters:
        `orientation` - the scroll bar to move. Possible values: `ScrollOrientation`
        `toPos` - the position to move the scroll bar to.
      Throws:
        `GeneralLeanFtException` - if an error occurs during execution.

    - #### activate

          void activate()
                 throws GeneralLeanFtException

      Activates the SAP window.
      Throws:
        `GeneralLeanFtException` - if an error occurs during execution.

    - #### close

          void close()
              throws GeneralLeanFtException

      Closes the window or dialog box in a SAP GUI for Windows application.
      Throws:
        `GeneralLeanFtException` - if an error occurs during execution.

    - #### maximize

          void maximize()
                 throws GeneralLeanFtException

      Maximizes the window or dialog box.
      Throws:
        `GeneralLeanFtException` - if an error occurs during execution.

    - #### resize

          void resize(java.awt.Dimension size)
               throws GeneralLeanFtException

      Resizes the window so that the available working area has the specified width and height in character metric.
      Parameters:
        `size` - the target size.
      Throws:
        `GeneralLeanFtException` - if an error occurs during execution.

    - #### resize

          void resize(int width,
                      int height)
               throws GeneralLeanFtException

      Resizes the window to the specified dimensions.
      Parameters:
        `width` - in pixels.
        `height` - in pixels.
      Throws:
        `GeneralLeanFtException` - if an error occurs during execution.

    - #### restore

          void restore()
                throws GeneralLeanFtException

      Restores a maximized window or dialog box to its original size.
      Throws:
        `GeneralLeanFtException` - if an error occurs during execution.

    - #### selectMenuItemById

          void selectMenuItemById(java.lang.String menuItemId)
                           throws GeneralLeanFtException

      Selects an item from a context menu. A context menu is accessed with a right click.
      Parameters:
        `menuItemId` - the ID of the menu item.
      Throws:
        `GeneralLeanFtException` - if an error occurs during execution.

    - #### sendKey

          void sendKey(SapFunctionKey key)
                throws GeneralLeanFtException

      Presses a non-printing key or key combination.
      Parameters:
        `key` - the key or combination.
      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: