Share this page

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 Summary

    Methods
    Modifier and Type | Method and Description
    --- | ---
    `<TTopLevel extends TopLevelObject> TTopLevel` | `describe(Class<TTopLevel> type, Description description)` Describes a top level Window or Dialog test object in this environment.
    `KeyboardDevice` | `getKeyboard()` Returns a `KeyboardDevice` object that enables device replay on the environment.
    `MouseDevice` | `getMouse()` Returns a `MouseDevice` object that enables device replay on the environment.
    `SvInfo` | `getSvInfo()` Returns Service Virtualization Server info.
    `Aut` | `launchAut(String fileName)` Launches an AUT using the file name.
    `Aut` | `launchAut(String fileName, String... args)` Launches an AUT using the file name and a list of arguments.
    `Aut` | `launchAut(String fileName, String[] args, String workingDirectory)` Launches an AUT using the file name, a list of arguments, and a working directory.
    `void` | `release()` Releases the environment, if it was locked as a grid node. Supported on UFT Developer versions 15.0.1 and later

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

    - #### getSvInfo

                                                      SvInfo getSvInfo()
          		throws GeneralLeanFtException

      Returns Service Virtualization Server info

      Returns:
        Object of type SvInfo, containing Service Virtualization information
      Throws:
        `GeneralLeanFtException` - if an error occurs during execution.

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

      Supported on UFT Developer versions 15.0.1 and later

          release()

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

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: