Trait augdom::testing::TargetExt[][src]

pub trait TargetExt {
    fn key(&self, key: Key<'_>);
fn event<E>(&self, event: E)
    where
        E: Event
; fn click(&self) { ... }
fn keyboardln(&self, contents: &str) { ... }
fn keyboard(&self, contents: &str) { ... }
fn enter(&self) { ... }
fn blur(&self) { ... } }

Convenience methods for dispatching events to targets, primarily useful for testing.

Required methods

fn key(&self, key: Key<'_>)[src]

Emit a pair of keydown/keyup events with key.

fn event<E>(&self, event: E) where
    E: Event
[src]

Dispatch the given event to this target.

Loading content...

Provided methods

fn click(&self)[src]

Dispatch a click event to the target.

fn keyboardln(&self, contents: &str)[src]

“Type” the provided text followed by the <Enter> key.

fn keyboard(&self, contents: &str)[src]

“Type” the provided text.

fn enter(&self)[src]

“Press” the <Enter> key.

fn blur(&self)[src]

Dismiss the target, causing it to lose focus.

Loading content...

Implementors

impl TargetExt for Node[src]

Loading content...