When working with HTML tables, one of the most common requirements is to dynamically find a row in the table that satisfies some condition. For example, you may have just created a new Contact in the test logic, which gets listed in a table format. Now you want to verify the information of this Contact in the table. Before you can use verification logic, you need to arrive at the right row number to work with - a row that contains the Contact you are looking for.
ACCELQ supports this requirement with an extensive array of matching criteria to find required row in HTML tables.
Command name: Find row containing given text in web table
Match criteria is primarily driven by a command option called Column Criteria.
Here is the complete listing of options you can provide while configuring this command in your logic.
1. Find the row number in Contacts table which contains the text "John", in the 2nd column. Only the first matching row is returned even if there are multiple rows with "John" in the 2nd column.
2. Find the row number in the Contacts table, which contains the text "John", in the 2nd column and "Schneider" in the 3rd column.
3. Find the row number in the table, which contains the text "John", in ANY column of the table.
4. Find ALL the row numbers in the table, which contain the text "John", in ANY column of the table. Row numbers are returned with a comma (,) separation.