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 Details

    • GuiSessionFactory

      public GuiSessionFactory()
  • Method Details

    • 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 OpenText Functional Testing for Developers 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 OpenText Functional Testing for Developers, 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