HTML table is a common composite control you will find on web applications for listing of data. accelQ supports comprehensive functionality related to automated test logic development on tables. You can dynamically parse tables, locate required rows & columns and also get a handle on elements that are part of table content.
This article describes most common commands useful when working with HTML tables. An HTML table control is identified as Web Table in accelQ view analyzer.
Note: In all Web Table commands, row numbering and column/cell numbering starts from 1. First row/column is indicated with 1.
Finding rows / columns
Get Cell Number Containing Text (given row)
Returns the cell index in the given row of an HTML table containing required text. Returns -1 if the row does not have any cell that contains required text.
Get Table Row Containing Text
Returns the row index of an HTML table containing given text.
Get Table Cell Count (given row)
Returns the count of number of cells in the given row of an HTML table.
Get Table Cell Text
Returns text from the given cell in the HTML table.
Get Table Row Count
Returns the row count from the given HTML table.
Verify DB Query With Web Table
Compares information from a database query against the content of a table. Extremely helpful when you have grid of information displayed in front-end based on a query on DB. You can make direct verification of result from DB with front-end.
Verify Element Exists In Table Cell
Verifies whether the given element exists in the table cell. This is verification command and it fails the test execution if the verification fails.
Verify Number of Cells in Table Row
Verifies the number of cells in a given row of an HTML table against an expected value.
Verify Number of Table Rows
Verifies the number of rows in an HTML table against an expected value.
Verify Table Cell Text
Verifies the text in a HTML table cell against an expected value.
Interacting with table and elements inside a cell
Click element in a table cell
Click a given template (repeat) element in a table cell. Make sure to pass the element as a generic, repeatable element.
Click Table Cell
Clicks the given cell element of an HTML table. Note that the row and cell numbering starts from 1.
Click Table Row
Clicks given row element in the HTML table. Row numbering starts from 1.
Enter text in an element, in table cell
Enters text in given template (repeat) element in a table cell. Make sure to pass the element as a generic, repeatable element.
Enter Text In Table Cell
Enters text in the given cell number of an HTML table.
Mouse Over Cell
Moves the mouse over to the given element
Select Item In Table Cell
Selects given dropdown item in the cell element in a HTML table.