T-Plan Home
T-Plan Robot Enterprise 3.0.1 Doc Collection
GUI Reference

T-Plan Robot Enterprise 3.0.1 Desktop Viewer

The Desktop Viewer is the GUI component situated at the right side of the T-Plan Robot Enterprise GUI.


The GUI by default creates a tabbed view for the workflow and the desktop. To disable this behavior and make the viewer display just the desktop image set off the Display Workflow When Connected option in the Desktop menu.

The connected remote desktop serves as the System Under Test (SUT). The word of "remote" means that it is typically other desktop than the local one. The desktop capabilities depend on the selected connection protocol:
For details on the SUT set up see the Release Notes document. A connection to a desktop can be established in several ways:
To disconnect from a desktop select Disconnect Desktop in the File menu. You can also disconnect by execution of a Disconnect command. As the viewer can handle just one desktop connection at a time (no tabbed views) connecting to another desktop will disconnect the previous connection. Execution of multiple parallel automated testing processes is typically achieved through the Multithreaded Java API in the CLI mode (with no GUI displayed).

The viewer is also able to operate in the read-only mode when no user input is transferred to the remote desktop. To switch this mode on or off use the Read Only Read Only menu item or the tool bar button. It is useful when more users share the same desktop or when you want just to view the desktop without interacting with it.

The read only mode may be also toggled through the Ctrl+F10 shortcut key (configurable in the Desktop Viewer panel of the Preferences window). This works even if the desktop is active and the key is filtered out from the communication between Robot and the desktop server. This is handy when one needs to take a screenshot of or create a template image from a desktop which displays an application driven by mouse moves, such as for example the Windows Start menu. The short cut key in this case toggles on the read only mode and stops the viewer immediately from sending the mouse events to the server.

The viewer automatically switches to read-only mode when a script execution is started to prevent users from unintentional interference with the test environment. This behavior is configurable in the Desktop Viewer panel of the Preferences window. It works as follows:
The viewer plays an important role in the main GUI. It allows to interact visually with the remote system under test in order to record and design test scripts or to watch progress of an automated testing process. Script Recorder and Script Editor are other two major GUI components which cooperate closely with the viewer to produce automated testing scripts. The Script Recorder is able to attach to the viewer's input event queue and record user interaction into the active script editor. The Script Editor then allows to execute the script or its part on the connected desktop.

The underlying connection framework provides several mechanisms useful mechanisms configurable through the Desktop->Desktop Preferences menu item:

Refresh Daemon
The Refresh Daemon is a background process which keeps the desktop session alive. If you don't move your mouse or type a key for a long time, the remote server usually runs a screen saver or locks up the desktop. Some desktop servers are also known to close the connection after a period of idle time. The daemon simply moves your mouse back and forth by one or two pixels after the configured idle time (5 minutes by default) to prevent these situations. 

The daemon doesn't run while a script is being executed. This is intended to prevent unwanted interference into the script execution. There's a flag in the preferences allowing to change this behavior and run the daemon even during automation.
Connection Recovery
The Connection Recovery mechanism repairs broken desktop connections during script executions. The framework automatically puts on hold any I/O operations (mouse, keyboard) and makes a few attempts to reconnect to the desktop until the specified time expires. If the connection gets recovered successfully the script resumes execution.

This mechanism targets recoverable connection errors such as for example intermittent network outages. It won't help if the target server crashes and it does not get restarted automatically by the SUT.

The recovery feature is by default off and must be enabled through the Desktop Preferences prior to the script execution.
Connection Pooling
The Connection Pooling mechanism allows the executed test scripts to release the desktop connection to the pool after the use rather than destroying them (disconnecting). Such connections may be then picked up by other scripts. This approach avoids the overhead of the desktop connection and it may significantly improve performance (while increasing the memory requirements) of multi threaded automated testing applications, especially where multiple shorter test scripts are executed against just one or a few test environments.

Operation of the connection pool requires a license with at least 2 connections (seats). For details see the RemoteDesktopClientFactory class documentation. To find out how many seats your instance is licensed to see the Tool->License Key Manager window.