pub struct TestDriver<S: GlobalState> {
pub harness: TestHarness<S>,
/* private fields */
}Fields§
§harness: TestHarness<S>Implementations§
Source§impl<S: GlobalState> TestDriver<S>
impl<S: GlobalState> TestDriver<S>
pub fn new(harness: TestHarness<S>) -> Self
pub fn set_viewport(&mut self, width: f32, height: f32)
pub fn pump(&mut self) -> Result<()>
pub fn find_text(&self, needle: &str) -> Option<TextMatch>
pub fn find_all_text(&self, needle: &str) -> Vec<TextMatch>
pub fn find_role(&self, role: Role) -> Vec<SemanticMatch>
pub fn get_all_visible_text(&self) -> Vec<String>
pub fn tap_point(&mut self, x: f32, y: f32) -> Result<()>
pub fn tap_text(&mut self, needle: &str) -> Result<()>
pub fn scroll(&mut self, at: LayoutPoint, delta: LayoutPoint) -> Result<()>
pub fn scroll_down(&mut self, at: LayoutPoint, pixels: f32) -> Result<()>
pub fn scroll_to_text(&mut self, needle: &str) -> Result<()>
pub fn type_text(&mut self, text: &str) -> Result<()>
pub fn press_key(&mut self, key: KeyCode, modifiers: u8) -> Result<()>
pub fn tick(&mut self, dt_ms: u64) -> Result<()>
pub fn assert_text_visible(&self, needle: &str)
pub fn assert_text_not_visible(&self, needle: &str)
Auto Trait Implementations§
impl<S> !RefUnwindSafe for TestDriver<S>
impl<S> !Send for TestDriver<S>
impl<S> !Sync for TestDriver<S>
impl<S> !UnwindSafe for TestDriver<S>
impl<S> Freeze for TestDriver<S>
impl<S> Unpin for TestDriver<S>where
S: Unpin,
impl<S> UnsafeUnpin for TestDriver<S>
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
Source§impl<T> Downcast for Twhere
T: Any,
impl<T> Downcast for Twhere
T: Any,
Source§fn into_any(self: Box<T>) -> Box<dyn Any>
fn into_any(self: Box<T>) -> Box<dyn Any>
Convert
Box<dyn Trait> (where Trait: Downcast) to Box<dyn Any>. Box<dyn Any> can
then be further downcast into Box<ConcreteType> where ConcreteType implements Trait.Source§fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
Convert
Rc<Trait> (where Trait: Downcast) to Rc<Any>. Rc<Any> can then be
further downcast into Rc<ConcreteType> where ConcreteType implements Trait.Source§fn as_any(&self) -> &(dyn Any + 'static)
fn as_any(&self) -> &(dyn Any + 'static)
Convert
&Trait (where Trait: Downcast) to &Any. This is needed since Rust cannot
generate &Any’s vtable from &Trait’s.Source§fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
Convert
&mut Trait (where Trait: Downcast) to &Any. This is needed since Rust cannot
generate &mut Any’s vtable from &mut Trait’s.Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more