#[non_exhaustive]pub enum FailureCode {
ElementNotFound,
NotVisible,
NotEnabled,
Ambiguous,
Timeout,
AssertionFailed,
AppNotRunning,
SimulatorNotBooted,
TapMissed,
CoordinateSpaceMismatch,
DriverError,
}Expand description
All failure codes smix surfaces back to the SDK / MCP / CLI (SCREAMING_SNAKE_CASE wire).
Variants (Non-exhaustive)§
This enum is marked as non-exhaustive
ElementNotFound
Selector matched zero elements in the visible tree.
NotVisible
Element matched but failed the visibility filter.
NotEnabled
Element matched but enabled = false.
Ambiguous
Selector matched multiple elements (when uniqueness was required).
Timeout
Operation exceeded the implicit-wait budget.
AssertionFailed
expect assertion (e.g. toHaveText) did not hold.
AppNotRunning
Target app exited or never launched.
SimulatorNotBooted
Simulator device is not booted.
TapMissed
The touch was synthesised, and it did not land inside the element the selector matched.
Distinct from ElementNotFound because the two send a reader
somewhere different: not-found means fix the selector, missed
means the element was there and the touch went elsewhere — a
stale frame, or something moved between the tree fetch and the
tap.
CoordinateSpaceMismatch
The screen is described in one coordinate space and the touch would be delivered in another, so no aim can land where the tree says the element is.
Distinct from TapMissed, and the distinction is the whole
point: a miss says the element was there and the touch went
elsewhere, which invites another attempt with a better point.
There is no better point here — whatever is passed gets
recomputed against the app’s frame and then read against the
device’s. Retrying is the trap, and the consumer who found this
spent an afternoon in it.
DriverError
Catch-all for runner / driver / IO failures.
Trait Implementations§
Source§impl Clone for FailureCode
impl Clone for FailureCode
Source§fn clone(&self) -> FailureCode
fn clone(&self) -> FailureCode
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more