'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.

ClassRequired components and sub-items
TreeTableRepresents the TreeTable component, contains all rows and cells.
TableRowRepresents a table row and tree node.
TableCellRepresents a table cell.
TableHeaderRepresents a row of the table headers.
TableHeaderCellRepresents a header cell.
Expander:TreeNodeExpanderRepresents 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.
Table 50.3:  Mapping of TreeTables

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">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span>
        <span>Item 1.1</span>
      </td>
      <td>Dolor sit amet</td>
    </tr>
  </tbody>
</table>
Example 50.24:  HTML TreeTable

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
Example 50.25:  TreeTable CWR configuration