Open topic with navigation

com.hp.lft.sdk.sap.gui

## Interface GuiSession

- All Superinterfaces:
    SupportsNativeObject, TestObject, TestObjectDescriber

      public interface GuiSession
      extends TestObject, SupportsNativeObject

  Represents a SAP GUI for Windows session.

- - ### Method Summary

    Modifier and Type | Method and Description
    --- | ---
    `void` | `close()` Closes the SAP GUI for Windows session without displaying a warning message.
    `java.lang.String` | `getActiveWindow()` Returns the name of the window in focus.
    `java.lang.String` | `getApplicationServer()` Returns the name of the application server.
    `java.lang.String` | `getClient()` Returns the client selected on the login screen.
    `long` | `getCodePage()` Returns the code page number in use in this session.
    `long` | `getFlushes()` Returns the number of flushes or passes of data during server communication to the client.
    `java.lang.String` | `getGroup()` Returns the login group information.
    `java.lang.String` | `getId()` Returns the object's unique identifier in text format.
    `long` | `getInterpretationTime()` Returns the time it takes for the client to interpret the information received from the server, in milliseconds.
    `java.lang.String` | `getLanguage()` Returns the language the user is working in.
    `java.lang.String` | `getMessageServer()` Returns the name of the message server.
    `java.lang.String` | `getName()` Returns the name of the object.
    `java.lang.String` | `getProgram()` Returns the name of the SAP source program that is executing.
    `long` | `getResponseTime()` The server response time in milliseconds.
    `long` | `getRoundTrips()` Returns the number of communications between client and server while the client is locked and waiting for data from the server.
    `long` | `getScreenNumber()` Returns the number of the screen that is displayed.
    `java.lang.String` | `getSystemName()` Returns the name of the SAP system.
    `long` | `getSystemNumber()` Returns the system number.
    `java.lang.String` | `getTransaction()` Returns the transaction the user is executing.
    `ComponentType` | `getType()` Returns the identification of the GUI component type.
    `java.lang.String` | `getUser()` Returns the user name for the current session.
    `void` | `reset()` Navigates to the session initial screen.
    `void` | `reset(java.lang.String transactionCode)` Navigates to the specified transaction.
    `void` | `sync()` Suspends execution until the SAP GUI for Windows session is available.
    `void` | `sync(long timeOut)` Suspends execution until the SAP GUI for Windows session is available or until timed out.

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

      `getNativeObject`

- - ### Method Detail

    - #### getType

                                                      ComponentType getType()
                         throws GeneralLeanFtException

      Returns the identification of the GUI component type.
      Returns:
        the type.
      Throws:
        `GeneralLeanFtException` - if an error occurs during execution.

    - #### getId

          java.lang.String getId()
                          throws GeneralLeanFtException

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

    - #### getName

          java.lang.String getName()
                            throws GeneralLeanFtException

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

    - #### getActiveWindow

          java.lang.String getActiveWindow()
                                    throws GeneralLeanFtException

      Returns the name of the window in focus.
      Returns:
        the name of the window.
      Throws:
        `GeneralLeanFtException` - if an error occurs during execution.

    - #### getApplicationServer

          java.lang.String getApplicationServer()
                                         throws GeneralLeanFtException

      Returns the name of the application server. Applies only when the connection specifies an application server and is not using load balancing.
      Returns:
        the name of the application server.
      Throws:
        `GeneralLeanFtException` - if an error occurs during execution.

    - #### getClient

          java.lang.String getClient()
                              throws GeneralLeanFtException

      Returns the client selected on the login screen.
      Returns:
        the selected client.
      Throws:
        `GeneralLeanFtException` - if an error occurs during execution.

    - #### getCodePage

          long getCodePage()
                    throws GeneralLeanFtException

      Returns the code page number in use in this session.
      Returns:
        the code page.
      Throws:
        `GeneralLeanFtException` - if an error occurs during execution.

    - #### getFlushes

          long getFlushes()
                   throws GeneralLeanFtException

      Returns the number of flushes or passes of data during server communication to the client.
      Returns:
        the number of flushes or passes.
      Throws:
        `GeneralLeanFtException` - if an error occurs during execution.

    - #### getGroup

          java.lang.String getGroup()
                             throws GeneralLeanFtException

      Returns the login group information. Applies only when connection is using load balancing.
      Returns:
        the login group information.
      Throws:
        `GeneralLeanFtException` - if an error occurs during execution.

    - #### getInterpretationTime

          long getInterpretationTime()
                              throws GeneralLeanFtException

      Returns the time it takes for the client to interpret the information received from the server, in milliseconds.
      Returns:
        milliseconds.
      Throws:
        `GeneralLeanFtException` - if an error occurs during execution.

    - #### getLanguage

          java.lang.String getLanguage()
                                throws GeneralLeanFtException

      Returns the language the user is working in.
      Returns:
        the language.
      Throws:
        `GeneralLeanFtException` - if an error occurs during execution.

    - #### getMessageServer

          java.lang.String getMessageServer()
                                     throws GeneralLeanFtException

      Returns the name of the message server. Applies only when connection is using load balancing.
      Returns:
        the name of the message server.
      Throws:
        `GeneralLeanFtException` - if an error occurs during execution.

    - #### getResponseTime

          long getResponseTime()
                        throws GeneralLeanFtException

      The server response time in milliseconds.
      Returns:
        milliseconds.
      Throws:
        `GeneralLeanFtException` - if an error occurs during execution.

    - #### getRoundTrips

          long getRoundTrips()
                      throws GeneralLeanFtException

      Returns the number of communications between client and server while the client is locked and waiting for data from the server.
      Returns:
        the number of communications.
      Throws:
        `GeneralLeanFtException` - if an error occurs during execution.

    - #### getSystemName

          java.lang.String getSystemName()
                                  throws GeneralLeanFtException

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

    - #### getSystemNumber

          long getSystemNumber()
                        throws GeneralLeanFtException

      Returns the system number. Applies only when connection specifies an application server and is not using load balancing.
      Returns:
        the system number.
      Throws:
        `GeneralLeanFtException` - if an error occurs during execution.

    - #### getUser

          java.lang.String getUser()
                            throws GeneralLeanFtException

      Returns the user name for the current session.
      Returns:
        the user name.
      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 screen that is displayed.
      Returns:
        the screen number.
      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.

    - #### sync

          void sync()
             throws GeneralLeanFtException

      Suspends execution until the SAP GUI for Windows session is available.
      Throws:
        `GeneralLeanFtException` - if an error occurs during execution.

    - #### sync

          void sync(long timeOut)
             throws GeneralLeanFtException

      Suspends execution until the SAP GUI for Windows session is available or until timed out.
      After time-out, the test run continues regardless of the session status.
      You can use this method when invoking a new session from an existing session or when moving from a session that is open on one server to a new session on a different server.
      Parameters:
        `timeOut` - milliseconds.
      Throws:
        `GeneralLeanFtException` - if an error occurs during execution.

    - #### close

          void close()
              throws GeneralLeanFtException

      Closes the SAP GUI for Windows session without displaying a warning message.
      You can invoke this method at the end of an action or a test iteration to close sessions that were opened during the test run. This ensures that each iteration begins with the same number of open SAP Gui for Windows sessions.
      Throws:
        `GeneralLeanFtException` - if an error occurs during execution.

    - #### reset

          void reset()
              throws GeneralLeanFtException

      Navigates to the session initial screen. We recommend using this method to ensure that tests are rerun from the initial screen of the session.
      Throws:
        `GeneralLeanFtException` - if an error occurs during execution.

    - #### reset

          void reset(java.lang.String transactionCode)
              throws GeneralLeanFtException

      Navigates to the specified transaction.
      Parameters:
        `transactionCode` - the transaction.
      Throws:
        `GeneralLeanFtException` - if an error occurs during execution.