com.hp.lft.sdk

Interface DesktopEnvironment

  • All Superinterfaces:
    Environment


    public interface DesktopEnvironment
    extends Environment
    Represents an environment on which UFT Developer performs test operations.
    • Method Detail

      • describe

        <TTopLevel extends TopLevelObject> TTopLevel describe(Class<TTopLevel> type,
                                                            Description description)
                                                  throws GeneralLeanFtException
        Describes a top level Window or Dialog test object in this environment.
        Type Parameters:
        TTopLevel - The generic type of the top level test object.
        Parameters:
        type - The test object type - Window or Dialog.
        description - The Description of the top-level Window or Dialog test object.
        Returns:
        the described top-level test object.
        Throws:
        GeneralLeanFtException - if error occurs during execution.
      • getMouse

                                                    MouseDevice getMouse()
        Returns a MouseDevice object that enables device replay on the environment.
        Returns:
        the mouse device replay object.
      • getKeyboard

                                                    KeyboardDevice getKeyboard()
        Returns a KeyboardDevice object that enables device replay on the environment.
        Returns:
        the keyboard device replay object.
      • launchAut

                                                    Aut launchAut(String fileName)
                      throws GeneralLeanFtException
        Launches an AUT using the file name. To use this method, you must create an application allowlist file. For details, see Add SDK code to your tests in the UFT Developer Help Center.
        Parameters:
        fileName - The name of the AUT file to launch. Specify only the name, or the full or relative path to the file.
        Returns:
        the launched AUT.
        Throws:
        GeneralLeanFtException - if error occurs during execution.
      • launchAut

                                                    Aut launchAut(String fileName,
                    String... args)
                      throws GeneralLeanFtException
        Launches an AUT using the file name and a list of arguments. To use this method, you must create an application allowlist file. For details, see Add SDK code to your tests in the UFT Developer Help Center.
        Parameters:
        fileName - The name of the AUT file to launch. Specify only the name, or the full or relative path to the file.
        args - A list of arguments.
        Returns:
        the launched AUT.
        Throws:
        GeneralLeanFtException - if error occurs during execution.
      • launchAut

                                                    Aut launchAut(String fileName,
                    String[] args,
                    String workingDirectory)
                      throws GeneralLeanFtException
        Launches an AUT using the file name, a list of arguments, and a working directory. To use this method, you must create an application allowlist file. For details, see Add SDK code to your tests in the UFT Developer Help Center.
        Parameters:
        fileName - The name of the AUT file to launch. Specify only the name, or the full or relative path to the file.
        args - A list of arguments.
        workingDirectory - A working directory.
        Returns:
        the launched AUT.
        Throws:
        GeneralLeanFtException - if error occurs during execution.
      • release

        release()
        Releases the environment, if it was locked as a grid node.