Repository navigation
qualify: find the save control by role and name when it has no selector - #1564
Merged
Merged
Conversation
The web fault driver and the qualification precondition required a CSS selector for the save control, which the recorder captures only for a unique #id. React apps (Medplum) give a save button its role and accessible name instead. Both now take role and name when they find exactly one element; no match or several matches is no target, and the fault declines. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
abrichr
enabled auto-merge
October 25, 2026 14:02
Member
Author
|
AI review (coordinator): approved. Qualification only: the web fault driver and the precondition accept a role and name locator that resolves to exactly one element (get_by_role with exact=True), and decline on none or several, so a fault is never injected against an ambiguous target. No replay or save path changes. Auto-merge stays on. |
abrichr
added a commit
that referenced
this pull request
Oct 25, 2026
Create now carries a form identity (bug 17, #1543). The run gate then refused seven unarmed field clicks on Medplum's placeholder-only form (bug 21), so the teach reaches those fields by keyboard from armed clicks; all 10 clicks are armed. Certification still refuses two key steps that only move the focus and assert no postcondition (bug 22). Evidence in results/medplum-phase-a/lease-2. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Bug 18 from the second-installation work (#1548).
Problem
qualifyrefused Medplum's save with "save step has no structural selector". The web fault driver, and the qualification precondition in front of it, required a CSS selector for the save control. The recorder captures a selector only for a unique#id, and a React app such as Medplum seldom gives its save button one. The recorder keeps the button's ARIA role and accessible name instead, and the backend's resolver already finds an element by those.Change
WebFaultDriver._save_targetaccepts a role and a name when the locator has no selector.check_readyaccepts a selector, or a role plus a name. A role alone is still refused, and the message says "structural locator".Tests
tests/test_fault_driver_role_name.py:Run locally: the qualification and fault selection (986 passed, 6 skipped), plus ruff, ruff format, mypy and strict mypy.
🤖 Generated with Claude Code