Commands for interacting with tables.
Table Commands expect a standard HTML table structure. A table with a different structure will need to be handled by a custom Madcow Operation plugin.
<table>
<thead>
<th></th>
</thead>
<tbody>
<tr>
<td></td>
</tr>
</tbody>
</table>Before performing any *.table.currentRow.* operation on a table you must first use the *.table.selectRow
command to select the row, this then enables performing table commands on the selected row using the *.table.currentRow.* syntax.
Operation to select a row for the HTML table, this allows subsequent table commands to reference this row using the currentRow syntax.
[MADCOW:htmlElementReference].table.selectRow = [columnName1 : 'columnValue1', columnName2 : 'columnValue2']#Select the row where the 'country' column equals 'New Zealand'
searchResultsTable.table.selectRow = [country : 'New Zealand']
#Select the row where 'country' equals 'Australia' and 'state' equals 'Queensland'
searchResultsTable.table.selectRow = [country : 'Australia', state : 'Queensland']When selecting a row, there a some of special keywords that Madcow will recognise, and process differently. These can be used to select a particular row without having to know (or care about) the contents of any given cell.
first
myTable.table.selectRow = firstlast
myTable.table.selectRow = lastrow{n} - where {n} is the number of the row (1 being the first row from the top, 2 being the next, etc).
myTable.table.selectRow = row3When operating on a column within a given table row, there are some special keywords that Madcow will recognise and process differently. These can be used to operate on a column without having to know (or care) about the title.
Select the first column for the current row in a table - firstColumn
myTable.table.currentRow.clickLink = 'firstColumn'
myTable.table.currentRow.checkValue = ['firstColumn' : 'some value']
myTable.table.currentRow.value = ['firstColumn' : 'some value']Selects the last column for the current row in a table - lastColumn
myTable.table.currentRow.clickLink = 'lastColumn'
myTable.table.currentRow.checkValue = ['lastColumn' : 'some value']
myTable.table.currentRow.value = ['lastColumn' : 'some value']Selects a given column by its column number - column{n} where {n} is the number of the column (1 being the first column from the left, 2 being the next, etc).
myTable.table.currentRow.clickLink = 'column1'
myTable.table.currentRow.checkValue = ['column3' : 'some value']
myTable.table.currentRow.value = ['column5' : 'some value']