hover
Move the pointer over a labeled element
Hover to reveal menus, tooltips, or hidden controls. Pair with should see / should in … see … to assert revealed content.
Syntax
When I hover on "<target>" [by …]Qualifiers
| Qualifier | Role | Example |
|---|---|---|
on | Target label | hover on "Profile" |
by … | Optional find hint | hover on "Profile" by id |
Requirements
| Item | Contract |
|---|---|
| Element / control shape | General resolve (fill → click → checkbox). Same shape rules as labeled actions — see click for the role=button vs default text nuance |
| How the label binds | Auto-find or by … |
| Qualifiers that change resolve | on + optional find hint |
| Platform | Web |
| Wrong shape → use instead | Need click → click |
See also UI contracts.
Examples
When I hover on "Profile"
Then I should see "Sign out"
When I hover on "chart" by id