|Addressing subitems of tables, lists and trees|
Subcomponents of tables, lists and trees can be addressed by indices. There are two main types: textual and numeric indices. Let's record a mouse click to a table cell and analyze the recorded 'QF-Test component ID'.
You will see the recorded mouse click in the 'Extras' section.
||Figure 4.1: Addressing a table cell|
The 'QF-Test component ID' recorded is
VehicleTable@Model&0. The single parts are:
VehicleTableis the 'QF-Test component ID' of the table component itself.
&separate the single parts from each other and at the same time indicate the type of index that follows:
@for a textual index and
&for a numeric index.
Modelis the textual index for the table column with the title 'Model'.
0is the numeric index for the first table row.
Note Numeric indices always start at 0.
You can use any index type for column or row. It is just important that the separator and the index type match.
The solution is to type
VehicleTable&1&2 in the 'QF-Test component ID'
attribute of the 'Mouse event' node.
In order to address the model 'I5'
using textual indices only, you would have to enter
Using numeric indices you would write
VehicleTable&0&4 and for mixed indices
The third type of index QF-Test supports is a textual index containing a
regular expression. Regular expressions can be used to replace a string
by an expression that can match for more than only one string.
For a detailed explanation of regular expressions please refer to the
So you could also address the cell for the model 'I5' using
Lists are addressed the same way as tables are, just with one index only.
A tree has only one index. This is the path down the tree to the node to be specified. The path consists of the respective branches of the tree, separated by slashes ('/'). Let's record a mouse click to a tree:
For the tree node 'Description' the recorded 'QF-Test component ID' would be
DetailsTree@/Information/Description. The single parts are:
DetailsTreeis the 'QF-Test component ID' of the tree component itself.
@separates the 'QF-Test component ID' of the tree from the index and at the same time indicates the type of index that follows:
@for a textual index.
/Information/Descriptionis the textual index for the tree path to 'Description'.
If you wanted to address the
node using a numeric index you would have to use
|Last update: 05/02/2018
Copyright © 2002-2018 Quality First Software GmbH