Specify values
In addition to simple character strings and numerical data, you can specify the following values in the Value column:
-
"Keyboard commands": simulate keyboard commands
-
"Click operations": perform mouse-clicks
-
"Scroll operations": define scrolling behavior
-
"Text expressions": use values you have previously saved, for instance in buffers or configuration parameters
-
"Regular expressions": use regular expressions to compare strings
-
"Resource expressions": reference a resource
-
"Dynamic date and time expressions": generate dynamic time and date values
-
"Graphical View": view dynamic expressions in a clear and easily understandable way
-
"Number formats": define number formats
-
"Random values: numbers and texts": generate random strings
-
"Perform calculations": calculations, with or without Microsoft® Excel
-
"UserSimulation": list of controls that additionally support user simulation
-
"String operations": perform various string operations
-
"Intervals": use an interval for numeric values
Specify all dynamic expressions with the following syntax:
Syntax: |
{COMMAND[Parameter1][Parameter 2]…[Parameter n]} |
Depending on the specific command, parameters are optional.
Engines 3.0 values support special characters and wildcards.
Special characters
Tricentis Tosca regards the following characters as special characters: {, }, [, ], ", and * (if the asterisk is part of a string and not a wildcard).
If you want to use special characters in your tests, you have to let the system know that it should treat these characters as part of a string.
To do so, escape special characters with double quotation marks: "
You can escape in one of two ways:
-
Manually, by entering the quotation marks.
-
Via the context menu entry Escape value. In this case, Tricentis Tosca automatically adds the correct escape characters. It interprets the asterisk literally as a character and not as a wildcard.
Create a buffer with the value {ABC}
If you want to escape special characters manually, keep the following rules in mind:
Rule 1: You can escape characters individually, or you can escape entire strings
To use the value Tric*ntis, you can enter either Tric"*"ntis or "Tric*ntis".
This only applies if the asterisk is part of the string and not used as a wildcard. You do not have to escape wildcards.
Rule 2: The special character " needs special treatment
The special character " requires two types of escaping:
-
Double quotation marks to escape a special character
-
An additional leading double quotation mark to indicate that the subsequent " is the actual string and not the end of an escaped string
For instance: To work with the value {"Example"}, you need to enter "{""Example""}".
-
The " in the beginning and the end escape the entire string, including the special characters { and ".
-
The " tells the system to treat the subsequent " as a string.
Wildcards
Tricentis Tosca supports wildcards * in the following cases:
-
In strings in the Value column
-
In tables: row name, column name, cell name
You can enter more than one wildcard, e.g. *ri*n*s instead of Tricentis.
If you want to use the asterisk as part of a string and not as a wildcard, you need to escape it. |
In this example, you are searching for a row that contains a cell whose content ends with 1967. In this row, you are looking for a cell in a column whose header starts with Last. Then you verify whether the content of this cell is Smith.
Wildcards in a table |
In this example, you use the parameter Title to search for a caption. The value Vehicle Insurance* specifies that the caption starts with Vehicle Insurance.
Wildcard in the parameter Title |