51.1.5 CustomWebResolver – TreeTable
Tree tables are a combination of table and tree.
For them, you map TreeTable the same way you would a normal table.
Additionally, you need to map the open/close buttons of the tree nodes.
QF-Test assumes that the tree components are located in the first table column.
You can adjust this behavior with the Configuration category treetableResolver of the Install CustomWebResolver.
If QF-Test does not recognize the level of branches or leaves out-of-the-box or does not
expand nodes correctly,
you can configure the Configuration category treeResolver of the CustomWebResolver.
Alternatively, you can use
The TreeIndentationResolver Interface to configure
the indentation detection.
| Class | Required components and sub-items |
|---|---|
| TreeTable | Represents the TreeTable component, contains all rows and cells. |
| TableRow | Represents a table row and tree node. |
| TableCell | Represents a table cell. |
| TableHeader | Represents a row of the table headers. |
| TableHeaderCell | Represents a header cell. |
| Expander:TreeNodeExpander | Represents the toggling component used to open and close the tree node. |
| Optional sub-items | |
| TreeNode | (Optional) Represents a tree node, must be located inside a TableCell. |
| Spacer:TreeNodeSpacer | (Optional) Represents the spacing object used to create the indentation of the tree node. |
| CheckBox:TreeNodeCheckBox | (Optional) Represents a CheckBox of a tree node. |
| Icon:TreeNodeIcon | (Optional) Represents an Icon in a tree node. |
Example:
A TreeTable could look like this in HTML code:
<table id="DetailsTreeTable" class="treetable">
<thead>
<tr>
<th>Information</th>
<th>Details</th>
</tr>
</thead>
<tbody>
<tr class="treenode odd>
<td>
<span class="treetoggler"></span>
<span>Item 1</span>
</td>
<td>Lorem ipsum</td>
</tr>
<tr class="treenode odd>
<td>
<span class=treenodespacer"> </span>
<span>Item 1.1</span>
</td>
<td>Dolor sit amet</td>
</tr>
</tbody>
</table>
The matching configuration of the Install CustomWebResolver node
could look like this:
genericClasses: - TreeTable: treetable - TableRow: <TR> - TableCell: <TD> - TableHeader: <THEAD> - TableHeaderCell: <TH> - Expander:TreeNodeExpander: treetoggler