pub enum Error {
PermissionDenied {
instructions: String,
},
AccessibilityNotEnabled {
app: String,
instructions: String,
},
SelectorNotMatched {
selector: String,
},
ElementStale {
selector: String,
},
ActionNotSupported {
action: String,
role: Role,
},
TextValueNotSupported,
Timeout {
elapsed: Duration,
},
InvalidSelector {
selector: String,
message: String,
},
InvalidActionData {
message: String,
},
NoElementBounds,
Unsupported {
feature: String,
},
Platform {
code: i64,
message: String,
},
}Expand description
Structured error type for xa11y operations. Designed to be informative across FFI boundaries.
Variants§
PermissionDenied
Accessibility permissions not granted.
AccessibilityNotEnabled
The target application advertises an accessibility tree but its
content is empty because the app’s accessibility bridge is disabled
(Chromium/Electron on Linux without --force-renderer-accessibility,
for example).
SelectorNotMatched
No element matched the selector.
ElementStale
The node’s platform handle is stale and re-traversal could not relocate it.
ActionNotSupported
The requested action is not supported by this element.
TextValueNotSupported
Text value input is not supported for this element on this platform.
Timeout
A wait_for or wait_for_event call exceeded its timeout.
InvalidSelector
The selector string could not be parsed.
InvalidActionData
Invalid argument to an action method.
NoElementBounds
The element has no bounds (e.g. an off-screen or virtual node), so a screen point can’t be computed for input simulation.
Unsupported
The requested operation has no implementation on this platform/session (e.g. pointer warp on Wayland without a portal grant).
Platform
A platform-specific error occurred.
Trait Implementations§
Source§impl Error for Error
impl Error for Error
1.30.0 · Source§fn source(&self) -> Option<&(dyn Error + 'static)>
fn source(&self) -> Option<&(dyn Error + 'static)>
1.0.0 · Source§fn description(&self) -> &str
fn description(&self) -> &str
use the Display impl or to_string()