Static Table
Tables & Data Lists Static Intermediate Must HaveHands-on
Interactive Sandbox
Try this
- Open page
- Interact control
- Read result
Assert this
- Visible elements
- Text matches
- Button state toggles
Tables / Static
Static Table
Basic read-only table with a highlight action.
| SKU | Name | Stock |
|---|---|---|
| SKU-001 | Keyboard | 12 |
| SKU-002 | Mouse | 30 |
| SKU-003 | Monitor | 8 |
| SKU-004 | Headset | 15 |
No highlight
Learning & behavior
User flow
- Open page
- Interact control
- Read result
Learning objectives
- Pick solid locators
- Time waits
- Assert state
Suggested assertions
- Visible elements
- Text matches
- Button state toggles
Selector tips
Good
- [data-test-id='static-table-primary']
- [data-test-id='static-table-secondary']
- [data-test-id='static-table-action']
- [aria-label='Static Table']
- getByRole('button', { name: 'Static' })
Fallback
- section.static-table-container :nth-of-type(1)
- .card.static_table button:nth-of-type(1)
- form.static-table-form .field-group:nth-child(1)
Avoid
- .mt-4.mb-2.flex.items-center > input:nth-child(1)
- .css-1a2b3c4
- div[class*='temp-'][class*='hover']
Notes
- Some parts delay render
- Icon buttons need aria-label
- Layout classes may shift