Skip to content

Table Count Rows

tchorvat edited this page Sep 16, 2011 · 5 revisions

Table Count Rows

Operation to count the rows for the HTML table, this allows subsequent verification commands test against the number of rows.

  • equals
  • greaterThan
  • greaterThanOrEquals
  • lessThan
  • lessThanOrEquals

Usage

[MADCOW:htmlElementReference].table.countRows.[verification command] = [number to verify]

Examples

searchResultsTable.table.countRows.equals = 1
searchResultsTable.table.countRows.greaterThan = 1 
searchResultsTable.table.countRows.lessThanOrEquals = 2

Table Count Rows with selection criteria

The countRows operation also optionally allows the user to specify some selection criteria, so that rows will only be counted if they have a given value in a given column.

Usage

[MADCOW:htmlElementReference].table.countRows[columnName : columnValue].[verification command] = [number to verify]

Examples

#Make sure there are no rows where suburb = 'west end'
searchResultsTable.table.countRows['Suburb' : 'West End'].equals = 0

#Make sure that 10 rows where the fourth column = 'Brisbane'
searchResultsTable.table.countRows['column4' : 'BRISBANE'].equals = 10

#Check that there are more than 9 rows where state = 'Queensland' and the last column = '4000'
searchResultsTable.table.countRows['State' : 'Queensland', 'lastColumn' : '4000'].greaterThan = 9

Clone this wiki locally