Test Code: index.js
Tested Page: index.html
This example shows how to select a table row based on the cell content.
The tested page includes a table with Id
, First name
and Last name
columns and three rows of data. A click on a row highlights it.
The test identifies the target row by the value of its Id
column. Then it uses the t.eql
method to verify cell values in this row and the t.ok
method to check that it is highlighted.
- Test Structure:
- Fixture.page Method
- test Function
- Element Identification and Actions:
- Selector Object
- t.click Method
- Selector.withExactText Method
- Selector.parent Method
- Selector.child Method
- Selector.nth Method
- DOM Node State Object:
hasClass
Method
- Assertion and Evaluation:
- t.expect.eql Method