Expand description
Assertion utilities for robot testing
This module provides assertion helpers specifically designed for validating UI state in robot tests.
Structs§
- Bounds
- Bounds of a UI element (x, y, width, height)
Traits§
- Semantic
Element Like - Generic semantic element trait for tree traversal This allows the helpers to work with both cranpose::SemanticElement and similar types
Functions§
- assert_
approx_ eq - Assert that a value is within an expected range.
- assert_
contains_ text - Assert that a list contains a specific text fragment.
- assert_
count - Assert that a collection has an expected count.
- assert_
not_ contains_ text - Assert that a list does not contain a specific text fragment.
- assert_
rect_ approx_ eq - Assert that a rectangle is approximately equal to another.
- assert_
rect_ contains_ point - Assert that a rectangle contains a point.
- find_
button_ bounds - Find a clickable element (button) containing the specified text. Returns the bounds (x, y, width, height) if found.
- find_
elements_ by_ role - Find all elements matching a role (e.g., “Layout”, “Text”).
- find_
text_ bounds - Find an element by text content and return full bounds.
- find_
text_ center - Find an element by text content in the semantic tree. Returns the center coordinates (x, y) if found.