Share this page

com.hp.lft.sdk.sap.gui

## Class GuiSessionFactory

- java.lang.Object
- - com.hp.lft.sdk.sap.gui.GuiSessionFactory

-     public class GuiSessionFactory
      extends Object

  A class for creating a `GuiSession` instance.

- - ### Constructor Summary

    Constructors
    Constructor and Description
    `GuiSessionFactory()`

  - ### Method Summary

    Methods
    Modifier and Type | Method and Description
    --- | ---
    `static GuiSession` | `attach(GuiSessionDescription description)` Returns a new `GuiSession` instance. The instance is attached to a session that was not opened by UFT Developer, for example, a session that was opened manually or by the AUT.
    `static GuiSession[]` | `getAllOpenSessions(GuiSessionDescription description)` Returns the open sessions that match the description.
    `static GuiSession` | `launch(InetAddress serverIP)` Opens a connection to the specified SAP server according to its IP address.
    `static GuiSession` | `launch(InetAddress serverIP, int instanceNumber)` Opens a connection to the specified SAP server according to its IP address.
    `static GuiSession` | `launch(InetAddress serverIP, String client, String username, String password)` Launches the SAP GUI session and logs on to the specified server with the specified user credentials and the default EN language.
    `static GuiSession` | `launch(InetAddress serverIP, String client, String username, String password, int instanceNumber)` Launches the SAP GUI session and logs on to the specified server with the specified user credentials and the default EN language.
    `static GuiSession` | `launch(InetAddress serverIP, String client, String username, String password, int instanceNumber, String language)` Launches the SAP GUI session and logs on to the specified server with the specified user credentials.
    `static GuiSession` | `launch(SessionLaunchInfo launchInfo)` Launches the SAP GUI session and logs on to the server using the user credentials and details specified in the launchInfo parameter.
    `static GuiSession` | `launch(SessionLaunchInfo launchInfo, DesktopEnvironment env)` Launches the SAP GUI session and logs on to the server using the user credentials and details specified in the launchInfo parameter. Use this overload when working with a UFT Developer grid.
    `static GuiSession` | `launch(String serverDescription)` Launches the SAP GUI session on the specified server.
    `static GuiSession` | `launch(String serverDescription, String client, String username, String password)` Launches the SAP GUI session and logs on to the specified server with the specified user credentials and the default EN language.
    `static GuiSession` | `launch(String serverDescription, String client, String username, String password, String language)` Launches the SAP GUI session and logs on to the specified server with the specified user credentials.

    - ### Methods inherited from class java.lang.Object

      `clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

- - ### Constructor Detail

    - #### GuiSessionFactory

          public GuiSessionFactory()

  - ### Method Detail

    - #### launch

          public static GuiSession launch(String serverDescription)
                                   throws GeneralLeanFtException

      Launches the SAP GUI session on the specified server.
      Parameters:
        `serverDescription` - The description is identical to the one displayed in the SAP Logon dialog box and is case-sensitive.
      Returns:
        the launched session.
      Throws:
        `GeneralLeanFtException` - if error occurs during execution

    - #### launch

          public static GuiSession launch(InetAddress serverIP)
                                   throws GeneralLeanFtException

      Opens a connection to the specified SAP server according to its IP address.
      Parameters:
        `serverIP` - the SAP server IP.
      Returns:
        the launched session.
      Throws:
        `GeneralLeanFtException` - if error occurs during execution

    - #### launch

          public static GuiSession launch(InetAddress serverIP,
                          int instanceNumber)
                                   throws GeneralLeanFtException

      Opens a connection to the specified SAP server according to its IP address.
      Parameters:
        `serverIP` - the connection IP for the SAP server to which you want to open a connection.
        `instanceNumber` - the system number property of the session.
      Returns:
        the launched session.
      Throws:
        `GeneralLeanFtException` - if error occurs during execution

    - #### launch

          public static GuiSession launch(String serverDescription,
                          String client,
                          String username,
                          String password)
                                   throws GeneralLeanFtException

      Launches the SAP GUI session and logs on to the specified server with the specified user credentials and the default EN language.
      Parameters:
        `serverDescription` - The description is identical to the one displayed in the SAP Logon dialog box and is case-sensitive.
        `client` - the SAP client.
        `username` - the log-on user name.
        `password` - the encrypted password.
      Returns:
        the launched session.
      Throws:
        `GeneralLeanFtException` - if error occurs during execution

    - #### launch

          public static GuiSession launch(String serverDescription,
                          String client,
                          String username,
                          String password,
                          String language)
                                   throws GeneralLeanFtException

      Launches the SAP GUI session and logs on to the specified server with the specified user credentials.
      Parameters:
        `serverDescription` - The description is identical to the one displayed in the SAP Logon dialog box and is case-sensitive.
        `client` - the SAP client.
        `username` - the log-on user name.
        `password` - the encrypted password.
        `language` - the 2-letter language code.
      Returns:
        the launched session.
      Throws:
        `GeneralLeanFtException` - if error occurs during execution

    - #### launch

          public static GuiSession launch(InetAddress serverIP,
                          String client,
                          String username,
                          String password)
                                   throws GeneralLeanFtException

      Launches the SAP GUI session and logs on to the specified server with the specified user credentials and the default EN language.
      Parameters:
        `serverIP` - the SAP server IP.
        `client` - the SAP client.
        `username` - the log-on user name.
        `password` - the encrypted password.
      Returns:
        the launched session.
      Throws:
        `GeneralLeanFtException` - if error occurs during execution

    - #### launch

          public static GuiSession launch(InetAddress serverIP,
                          String client,
                          String username,
                          String password,
                          int instanceNumber)
                                   throws GeneralLeanFtException

      Launches the SAP GUI session and logs on to the specified server with the specified user credentials and the default EN language.
      Parameters:
        `serverIP` - the SAP server IP.
        `client` - the SAP client.
        `username` - the log-on user name.
        `password` - the encrypted password.
        `instanceNumber` - the system number property of the session.
      Returns:
        the launched session.
      Throws:
        `GeneralLeanFtException` - if error occurs during execution

    - #### launch

          public static GuiSession launch(InetAddress serverIP,
                          String client,
                          String username,
                          String password,
                          int instanceNumber,
                          String language)
                                   throws GeneralLeanFtException

      Launches the SAP GUI session and logs on to the specified server with the specified user credentials.
      Parameters:
        `serverIP` - the SAP server IP.
        `client` - the SAP client.
        `username` - the log-on user name.
        `password` - the encrypted password.
        `instanceNumber` - the system number property of the session.
        `language` - the 2-letter language code.
      Returns:
        the launched session.
      Throws:
        `GeneralLeanFtException` - if error occurs during execution

    - #### launch

          public static GuiSession launch(SessionLaunchInfo launchInfo,
                          DesktopEnvironment env)
                                   throws GeneralLeanFtException

      Launches the SAP GUI session and logs on to the server using the user credentials and details specified in the launchInfo parameter. Use this overload when working with a UFT Developer grid.
      Parameters:
        `launchInfo` - The session launch information.
        `env` - the environment on which to launch the GUI session, obtained using the EnvironmentFactory.get method.
      Returns:
        the launched session.
      Throws:
        `GeneralLeanFtException` - if error occurs during execution

    - #### launch

          public static GuiSession launch(SessionLaunchInfo launchInfo)
                                   throws GeneralLeanFtException

      Launches the SAP GUI session and logs on to the server using the user credentials and details specified in the launchInfo parameter.
      Parameters:
        `launchInfo` - The session launch information.
      Returns:
        the launched session.
      Throws:
        `GeneralLeanFtException` - if error occurs during execution

    - #### attach

          public static GuiSession attach(GuiSessionDescription description)
                                   throws GeneralLeanFtException

      Returns a new `GuiSession` instance. The instance is attached to a session that was not opened by UFT Developer, for example, a session that was opened manually or by the AUT.
      Parameters:
        `description` - `GuiSessionDescription` for filtering the open sessions.
      Returns:
        `GuiSession` for the matching launched session.
      Throws:
        `GeneralLeanFtException` - if error occurs during execution unless exactly one match is found.

    - #### getAllOpenSessions

          public static GuiSession[] getAllOpenSessions(GuiSessionDescription description)
                                                 throws GeneralLeanFtException

      Returns the open sessions that match the description.
      Parameters:
        `description` - filter for sessions.
      Returns:
        the sessions.
      Throws:
        `GeneralLeanFtException` - if 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: