---
Help: Tests on working with tables representing a grid, where similar grids are present.
---
This test ensures we can find elements inside tables representing a grid where each column indicates a property and each row contains the values for the properties of one item.
We check we find the right table, based on the column values we look for.

!define HTML { {{{
<!DOCTYPE html>
<html lang="en">
<body>
<table>
    <thead>
    <tr><th>Lastname</th><th>Firstname</th><th>Gender</th><th>Birth date</th><th></th></tr>
    </thead>
    <tbody>
    <tr><td>Smith</td><td>Joe</td><td>Male</td><td>10-01-1975</td><td><button>Edit</button><button>Delete</button></td></tr>
    <tr><td>Johnson</td><td>Pamela</td><td>Female</td><td>01-12-1978</td><td><button>Edit</button><button>Delete</button></td></tr>
    <tr><td><a>Rogers<img />-Smith</a></td><td>Jack</td><td>Male</td><td>10-01-1980</td><td><button>Edit</button><button>Delete</button></td></tr>
    </tbody>
</table>
<table>
    <thead>
    <tr><th>Lastname</th><th>Firstname</th><th>Gender</th><th>Birth date</th><th></th></tr>
    </thead>
    <tbody>
    <tr><td>Foo</td><td>Boris</td><td>Female</td><td>11-01-1975</td><td><button>Edit</button><button>Delete</button></td></tr>
    <tr><td>Bar</td><td>Angela</td><td>Male</td><td>11-12-1978</td><td><button>Edit</button><button>Add</button></td></tr>
    </tbody>
</table>
</body>
</html>}}} }


|script      |mock xml server setup|
|add response|${HTML}              |
|$url=       |get mock server url  |

|script                |browser test                                                                    |
|seconds before timeout|1                                                                               |
|open                  |$url                                                                            |
|check                 |value of column number|1           |in row number|2        |Johnson             |
|check                 |value of              |Firstname   |in row where |Lastname |is|Rogers|Jack      |
|check                 |value of              |Birth date  |in row where |Lastname |is|Rogers|10-01-1980|
|click                 |Edit                  |in row where|Lastname     |is       |Smith               |
|check                 |value of              |Firstname   |in row where |Lastname |is|Foo   |Boris     |
|check                 |value of              |Birth date  |in row where |Firstname|is|Angela|11-12-1978|
|click                 |Add                   |in row where|Lastname     |is       |Bar                 |


|script|mock xml server setup|
|stop                        |
