StructuredLocator
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
Read a failure
Browser diagnostics list every attemptedkind 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.
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.