Verify AX error handling for select_range on non-text element
Session from pi-computer-use-sessions on Hugging Face by thomasmustier · MIT · condensed by Coders Talk
Click a segment to jump to that moment
17ssession
0interventions
GOAL
Confirm that calling select_range on a non-text AXMenuButton element in TextEdit produces a clean, expected error message rather than a crash or silent failure.
- +0Prompt · +0Screenshot TextEdit, then call select_range on @e2 (a menu button, not a text input) and confirm it fails cleanly with the AXSelectedTextRange error, quoting it verbatim.
- +0mAgent did · +0mTook a screenshot of TextEdit and captured the semantic window state, identifying @e2 as an AXMenuButton distinct from the AXTextArea @e1.
- +0mAgent did · +0mCalled select_range on @e2, which correctly errored out with 'AXSelectedTextRange not settable', matching the expected failure mode.
- +0mOutcome · +0mConfirmed the exact error message: 'Element does not support selecting a text range (AXSelectedTextRange not settable). Use set_text for full replacement, or focus the element with click first.'
VERDICT
I'd start with the exact same setup next time — asking it to quote the verbatim error is what made this useful as a test, rather than just checking pass/fail. No correction was needed here since the agent behaved exactly as expected on the first try.