Skip to main content

UserInterfaceTestingExtension

Trait UserInterfaceTestingExtension 

Source
pub trait UserInterfaceTestingExtension {
    // Required methods
    fn click(
        &mut self,
        position: Matrix<f32, Const<2>, Const<1>, ArrayStorage<f32, 2, 1>>,
    );
    fn click_at(&mut self, uuid: Uuid) -> Handle<UiNode>;
    fn click_at_text(&mut self, uuid: Uuid, text: &str);
    fn find_by_uuid(&self, uuid: Uuid) -> Option<&UiNode>;
    fn find_by_uuid_of<T>(&self, uuid: Uuid) -> Option<&T>
       where T: Control;
    fn poll_all_messages(&mut self);
    fn poll_and_count(&mut self, pred: impl FnMut(&UiMessage) -> bool) -> usize;
    fn click_at_count_response<M>(&mut self, name: Uuid, response: M) -> usize
       where M: MessageData + PartialEq;
    fn type_text(&mut self, text: &str);

    // Provided method
    fn is_visible(&self, uuid: Uuid) -> bool { ... }
}

Required Methods§

Source

fn click( &mut self, position: Matrix<f32, Const<2>, Const<1>, ArrayStorage<f32, 2, 1>>, )

Clicks at the given position.

Source

fn click_at(&mut self, uuid: Uuid) -> Handle<UiNode>

Tries to find a widget with the given unique id and clicks at its center.

Source

fn click_at_text(&mut self, uuid: Uuid, text: &str)

Source

fn find_by_uuid(&self, uuid: Uuid) -> Option<&UiNode>

Source

fn find_by_uuid_of<T>(&self, uuid: Uuid) -> Option<&T>
where T: Control,

Source

fn poll_all_messages(&mut self)

Source

fn poll_and_count(&mut self, pred: impl FnMut(&UiMessage) -> bool) -> usize

Source

fn click_at_count_response<M>(&mut self, name: Uuid, response: M) -> usize

Source

fn type_text(&mut self, text: &str)

Provided Methods§

Source

fn is_visible(&self, uuid: Uuid) -> bool

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.

Implementors§