Appearance
Finding Controls by Name or ID
When a step refers to a form field, an AireFrame subject field, a table filter, or a table action, you give AireAssert a plain piece of text - usually whatever the on-screen label says. Every control also has an ID (sometimes called a "Key") set up behind the scenes when the form or screen was built. AireAssert lets you refer to either one, and this page explains exactly how it decides which you meant.
The rule
- If your reference starts with
#, AireAssert treats it as an ID and only an ID. It will not fall back to matching a label. - Otherwise, AireAssert tries the ID first. If nothing matches, it then tries matching the on-screen label instead.
In practice this means you can almost always just type the label you see on screen, and it will work. The # prefix is there for the times you need to be explicit - most commonly when a label happens to look exactly like another control's ID, or when you want a step to keep working even if someone later changes the wording of a label.
Example
gherkin
# Matches the control labelled "Date of birth" on screen
When we set 'Date of birth' to '01/01/1990'
# Matches the control with the ID 'dateOfBirth', regardless of what its label currently says
When we set '#dateOfBirth' to '01/01/1990'Where this applies
This convention is used consistently wherever AireAssert asks you to name a control:
- AireForms controls, referred to by their on-screen label or their control ID.
- AireFrame subject fields, when creating, updating or asserting against a subject.
- AireFrame table widget filters.
- AireFrame table actions, and the input fields those actions need.
- AireFrame dashboards, when selecting one to view.
- AireFrame locations and departments (see AireFrame's own Configuration > Structure Configuration screen for the Key and Display Name of each)