Skip to main content
sndbox stores a locator as structured evidence rather than one handwritten selector.
StructuredLocator
The recorder prefers accessible role/name information, then retains label, placeholder, test ID, text, attribute, CSS, or XPath candidates as available. A locator test runs against the active managed session before you save the interaction.

Candidate strength

The primary candidate is the best evidence available at recording time. Alternatives are fallbacks, not permission to click the first vaguely similar element.

Example bundle

Recorded accessible button
Do not hand-author this object in ordinary workflows. Record the element so sndbox can capture alternatives and page context, then use Test locator against the expected page state.

Read a failure

Browser diagnostics list every attempted kind and value, its match count, whether it succeeded, whether it was a weak fallback, and any error. Use that sequence to decide whether the page changed, the target became ambiguous, or navigation had not finished.

Keep locators resilient

  • Prefer a stable role and accessible name over a styling class.
  • Require a unique match before allowing a click, fill, or upload.
  • Add an explicit Wait For node when content loads asynchronously.
  • Re-record against the real current page when a semantic label changes.
  • Avoid weakening the locator until it matches multiple controls.
Re-record after a deliberate product redesign. Do not keep stacking weak alternatives onto evidence recorded for a page that no longer exists.
The model contains framePath, but the current recorder targets the active main page. Do not document or rely on cross-frame recording as an implemented interaction.