Last update: 12 November
The Static Image connection allows to test file based
- Testing of systems producing image file output (screen shots,
data visualization etc.).
- Testing of live image files (continuously updating ones).
- Debugging of failed image comparisons from other connections,
such as screen shots taken through the Screenshot command or saved
automatically by the Image
- To connect manually from the Login
Dialog choose the Static Image connection
type in the drop down and provide the image file path.
- To connect from a test script use the Connect command (TPR scripts)
or the connect()
method (Java test scripts). The argument URL must be a standard
file URL such as
The URL may be also used together with the -c/--connect CLI option to
establish the connection on the Robot start up. Examples:
The connection by default refuses key events. TPR test
scripts relying on this connection report a syntax error in any Press, Type
or Typeline commands. This is
intended to make it clear that static images do not consume any key
events. To suppress this behavior and make the client consume key
events (and discard them silently) see the client preferences.
TPR test scripts:
The connection checks the image file size and last modified time at
regular intervals. When an update is detected it reloads the image.
This mechanism allows the connection to test systems generating
graphical output to an image in the file system. This behavior may
be modified in the connection Preferences.
Advanced URL Syntax:
- To load an image stored in a ZIP or JAR file use the URL like
For example, to load an image called
JAR file where the image is zipped into a folder called
- Relative paths are resolved against the Robot installation
directory. For example to load an image called
located in the Robot install folder use:
- A common practice is to place the test images to the Robot
project folder. The URL can be then constructed using the Project path variables
to ensure safe project move/copy. For example to connect to an
"screen.png" located in
the "images" folder inside the project directory
TPR test scripts:
file://" + getVariableAsString("_PROJECT_DIR") + "/images/screen.png