31.1 Addressing subitems of tables and lists
Subitems of tables and lists are addressed via indices. The two most important index types are the numerical index and the text index. To demonstrate this, we will now record a mouse click on a list item and take a closer look at the recorded QF-Test component ID.
- Action Start the CarConfig demo if it is not already running. Execute the Setup node in the test suite to do so.
-
Activate recording mode via “Start recording”
.
- Click a list item, e.g. the first model.
-
Stop recording via “Stop recording”
.
You will find the recorded mouse click in the Extras section.
The recorded QF-Test component ID is action_bar_root.list@Rolo.
It consists of the following parts:
-
action_bar_root.listis the QF-Test ID of the list component itself. -
@separates the index from the QF-Test component ID, defining the type of the index as a text index. -
Rolois the text index for the list item with the text “Rolo”. -
Alternatively you can use
&to specify a numerical index. Thus,&0would specify the first list item.
Note Numerical indices always start at 0.
Tables are addressed analogously to lists, but they have an additional index to address the column.
VehicleTable@Modell&0 addresses in table VehicleTable the column via the text index
Modell and the row via the numerical index 0.
This is just an example and cannot be tried out in the Android demo because there is no table in the app.