Generative AI-Based Testing Certification
Generative AI-Based Testing Certification
Working with Tables
testRigor drastically simplifies the process of working with tables. Let’s look at the example below:
# | Id | Name | Actions | Additional Data |
---|---|---|---|---|
Filter by | ||||
101 | york1 | Yorktown | Arrive Cancel | |
102 | spk2 | Spock | Listen to Ignore | |
103 | nyo3 | Nyota | Open channel Promote |
Refer to table cells by the intersection of the row and column and produce the value of the first cell in a row and the value of the header or top cell in the column. Let’s click on Open Channel:
click table "Actions" at row "103" and column "Actions"
You can also specify row by saying that row should contain a certain value. This way testRigor will check all values at every row to find a match. For example, for the same table above, and command:
click table "Actions" at row containing "spk2" and column "Actions"
will result in a click on the first action “Listen to”. To click on the second action “Ignore” you can leverage our context feature:
click "Ignore" in the context of table "Actions" at row containing "spk2" and column "Actions"
You can also work with multiline headers by referring to them wither “header” word:
enter "york1" into first table at the second header row and column "Id"
testRigor supports tables for all kinds of operations including but not limited to: validations (checks), clicks, hover, entering data (enter … into), drag and drop, etc. Examples:
check that table "Actions" at row "102" and column "Name" contains "Spock"
check that table "Actions" at row "101" and column "Additional Data" has value "Looks like a trap"
enter "This is a trap!" into table "Actions" at row "101" and column "Additional Data"
click "Open channel" within the context of second table at row "103" and column "Actions"
check that the second table at row containing "Nyota" and column "Actions" contains link "Open channel"
click the first button within the context of second table at row containing "Nyota" and column "Actions"
Keep in mind that there are many different types of tables, and at some point you might need to deal with some which are internally not a table but look like one.
If that’s the case and the test fails – you should use relative locations instead.
Q: For the table above, specify clicking on “Ignore” button using relative locations.