|T-Plan Robot Enterprise
RobotCodeTemplates.propertiesand saved to the user home folder. The file can be then copied to another environment and imported using the Import button in the Code Template Editor window. This system is intended to support situations where one person creates code templates for the whole team or company to enforce a certain process and/or format.
boolean value type ('true' or 'false'). It is shown in
the GUI as a
check box or a radio button.
color. It is shown in the GUI as a drop down with the
default set of
colors and a button allowing to add custom ones.
||A color. It is shown in the GUI as a drop down with the default set of colors and a button allowing to add a custom color and/or select a color from the desktop screen.|
directory. The GUI shows this value type as an editable
text field with
a button allowing to select a directory from the local
||A file. The GUI shows this value type as an editable text field with a button allowing to select a file from the local file system.|
||A floating point number. It is shown in the GUI as a number field.|
||An integer number. It is shown in the GUI as a number field.|
||An integer number which is interpreted as a boolean value of "false" (the value of 0) or "true" (any other value).|
||A key stroke, for example "Ctrl+C". It is shown in the GUI as an editable text field with the record and Keyboard Tool buttons.|
||A password. It is shown in the GUI as a password field.|
||A point (location) defined by the x and y coordinates. It is shown in the GUI as a pair of number fields together with a button allowing to select a point from the desktop screen.|
||A rectangle defined by the x, y, height and width coordinates. It is shown in the GUI as a set of four number fields together with a button allowing to select a rectangle from the desktop screen.|
||A java.util.regex.Pattern compliant regular expression. It is shown in the GUI as an editable text field with a button allowing to construct the expression from elements.|
||A string. It is shown in the GUI as an editable text field or as a drop down.|
||A string. It is shown in the GUI as an editable text field together with a button allowing to implement a custom value selector.|
||A text. It is shown in the GUI as an editable text area (a field with multiple lines).|
interval, such as "10s" (ten seconds).
the position where to put the dot (caret) in the script
the template code is inserted. When used together with
beginning of the text to select (highlight) in the
script editor after
the template code is inserted. It must be used in
Text selection may be optionally used to select a value or an expression which is expected to be rewritten right after the template insertion into the test script.
a place where to create a unique variable name. The
expression must be the variable ordinary number starting
from 1, for
This mark allows the template to specify that it needs to create one or more unique variables in a way that doesn't conflict with the existing test script code. When the template is being inserted into a script the framework retrieves the list of variables it uses and populates the template with a unique variable name which is not yet used. The preferred variable names serve as a prefix and they are suffixed with an ordinary number if needed.
For example consider a simple template which creates a for() statement looping from 1 to 10:
If such a template is inserted into a test script which already uses the 'i' variable for another purpose the framework creates a unique variable name as 'i2' and inserts the template as follows: