StrikekitStrikekit

scope

Switch element resolution to an iframe or frame for the scenario

Switch browsing context to a labeled iframe/frame for the rest of the scenario, or back to the main document. Separate from the element in stack.

Syntax

When I scope to "<frame-label>"
When I scope to "page"

Qualifiers

QualifierRoleExample
toFrame label or "page"scope to "Payment frame"

Examples

When I scope to "Payment frame"
When I fill "card-number" with "4111111111111111"
When I scope to "page"

Notes

  • Element resolution (fill, click, should have, …) uses the active frame until reset.
  • Free-standing should see / not see / see containing / wait-for-text also search inside the active iframe.
  • scope to "page" restores the main document (same as a new scenario start).
  • Cleared automatically at each Scenario: / Feature: boundary.
  • On mobile, scope to limits resolution to a labeled container (same grammar).
  • Not for tabs — use switch.

On this page