Expand description
Element actions: revalidation, the perform allowlist, and secure-field refusal.
Nothing here calls a platform API. The macOS backend and [crate::test_backend]
both ask this module whether an action may run, then record or perform it.
Structs§
- Element
Error - Failure that may carry the fresh tree for
stale_element. - Element
Outcome - Successful element action, before it is rendered as JSON.
- Element
Peek - Cached title and secure bit used by the confirm hook before an element action.
- Element
Request - Shared fields for one element command.
- Gate
- Revalidation succeeded. The backend may read settable or character count next.
- Gate
Input - Inputs
gateneeds. The live node is the re-fetched tree. - HitInfo
- Role and title of the element under a coordinate, when hit-testing finds one.
Enums§
- Element
Op - What the caller asked to do to one element index.
- Step
- One step the backend performs after
gateallows it.
Constants§
- FRAME_
TOLERANCE - Each edge may differ by this many screen points and still be the same element.
- PERFORM_
ALLOWLIST AXUIElementPerformActionnamesperform_actionaccepts.- REFRESH_
HINT - Hint included on
element_not_foundandstale_element.
Functions§
- activate_
outcome - Outcome for an action that the
activatetier performed. - find_
path - Child-index path of preorder
indexin a cached signature. - frame_
outside - True when
elementis not fully insidewindow. - frames_
match - True when every edge is within
FRAME_TOLERANCE. Missing frames match only each other. - gate
- Decide whether the action may run.
- outcome
- Success value shared by the macOS backend and the stub.
- press_
route - Left press stays
AXPress. Right usesAXShowMenuwhen that action is advertised. Every other button, and a right press without a menu, clicks the element center through the input tiers. - refresh_
hint - Refresh hint. A known app name replaces the literal
X. - require_
action execution_failedlisting the actions CopyActionNames returned.- steps
- Build the steps that run after settable and character-count reads.
- ui_
at_ path - Live node at a child-index path. An empty path is the root.
- validate_
count countmust be 1, 2, or 3.- validate_
perform_ name - Refuse names outside
PERFORM_ALLOWLIST. - validate_
range start <= end, both non-negative, andendwithinchar_countwhen it was read.- validate_
text - Empty text is refused when
empty_okis false. A null byte is always refused.