Concordion > Commands > verifyRows >

Support for 'thead' and 'tbody'

Although web browsers (and even the XHTML 1.0 Strict DTD) accept HTML tables without explicit <thead> and<tbody> sections, some people prefer to put them in. The verifyRows command supports tables containing these sections.

Example

Given the method getNames() returns a Collection containing the names: John, Paul

The following instrumentation:

<table concordion:verifyRows="#name : getNames()">
    <thead>
        <tr>
            <th concordion:assertEquals="#name">Name</th>
        </tr>
    </thead>
    <tbody>
        <tr>
            <td>John</td>
        </tr>
    </tbody>
</table>

Results in this output:

<table concordion:verifyRows="#name : getNames()">
    <thead>
        <tr>
            <th concordion:assertEquals="#name">Name</th>
        </tr>
    </thead>
    <tbody>
        <tr>
            <td class="success">John</td>
        </tr>
    <tr class="surplus"> _
<td class="failure"><del class="expected">&#160;</del>
<ins class="actual">Paul</ins></td> _
</tr> _
</tbody>
</table>

Notice how the surplus row is added into the tbody section.