store
Capture page text or field values into @ or @@ slots
Capture a labeled element's text or field value into a named slot for later steps.
Syntax
When I store "@slot" from "<label>"
When I store "@@slot" from "<label>"
When I store "@slot" from api json "<gjson-path>"Qualifiers
| Qualifier | Role | Example |
|---|---|---|
from | Source element label | store "@csrf" from "csrf-field" |
from api json | Path into last API response body (gjson) | store "@order-id" from api json "$.id" |
Requirements
| Item | Contract |
|---|---|
| Element / control shape | UI from — general resolve, then read text/value (InputValue preferred, else InnerText). from api json — no DOM; last HTTP response |
| How the label binds | First quote is destination slot name (not resolved as a read). Second quote is source label or json path |
| Qualifiers that change resolve | from vs from api json |
| Platform | UI store on web/mobile; api json requires Platform: api |
| Wrong shape → use instead | Need generated value → generate |
See also UI contracts.
Examples
When I store "@csrf" from "csrf-field"
When I store "@@order-id" from "confirmation-number"
Then I should see "@csrf"
When I fill "token" with "@csrf"
When I store "@order-id" from api json "$.id"Notes
@slot— scenario scope; cleared at the nextScenario:/Feature:.@@slot— group scope; shared across scenarios in the same file run on one browser.- Slot names must start with
@or@@. Values such as"user@example.com"are literals, not slots. - Resolve order for quoted values: whole-string slot →
{{faker}}→$ENV→ literal. from api jsonrequires Platform: api and a prior API response. It does not change UIstore … from.