in
Nested element scope stack for cards, sections, and regions
Push a nested element scope so following steps resolve inside a labeled region. Separate from iframe scope.
Syntax
When I in "<region>"
When I in ".."
When I in "page"Forms
| Form | Effect |
|---|---|
in "<region>" | Push: find a unique visible container under the current root, then nest |
in ".." | Pop one level — fails if already at root |
in "page" | Clear the entire element stack (iframe scope unchanged) |
Requirements
| Item | Contract |
|---|---|
| Element / control shape | Each pushed region must resolve as a container: role=dialog (HasText) → data-testid → aria-label → heading text → then general resolve (fill/click/checkbox) |
| How the label binds | Unique visible container under the current root |
| Qualifiers that change resolve | ".." / "page" are stack ops (no new container). One-shot click on … in "…" does not use this stack |
| Platform | Web (element regions); independent of iframe scope |
| Wrong shape → use instead | Put stable id / data-testid / aria-label on the region wrapper; or use heading text inside the section |
When it fails
- Container not found / ambiguous — region label does not uniquely match a container.
in ".."at root fails.
See also UI contracts.
Examples
When I in "products"
When I in "Laptop"
When I fill "note" with "gift"
When I click on "Delete"
When I in ".."
When I in "page"One-shot click inside a container without changing the stack:
When I click on "Delete" in "Laptop"Notes
- Containers resolve by id / aria-label / data-testid / container strategies.
- Nested
in "outer"thenin "inner"narrows under the current root. - Cleared at each
Scenario:/Feature:boundary. - Element
indoes not affect bareshould seetext search the way iframescopedoes.
Related
- scope
- click —
in/in rowone-shot - Action qualifiers
- UI contracts