Skip to main content

DriveOp

Enum DriveOp 

Source
pub enum DriveOp {
Show 48 variants Tap(String), Input(String, String), Toggle(String, bool), SetValue(String, f64), Select(String, usize), Focus(String), Submit(String), Navigate(String), WaitIdle, Pause(f64), Shot(String), AssertText(String, String), AssertVisible(String), AssertMissing(String), AssertHidden(String), Hover(String, Option<(f64, f64)>), HoverLeave(String), Pan(String, f64, f64), Pinch(String, f64), Drag(String, (f64, f64), (f64, f64)), TapAt(String, f64, f64), Key(Option<String>, String), AssertAnnounced(String), AssertValue(String, f64), AssertOn(String, bool), AssertFocused(String, bool), AssertRoute(String), A11yAudit(Option<String>), AssertNative(String, NativeExpect), AssertFrame(String, FrameExpect), SamplePixel(String, f64, f64, String), AssertOpenedUrl(String), Activate(String, usize), Reorder(String, usize, usize), DeleteRow(String, usize), SwipeRow(String, usize, bool, usize), ScrollTo(String, String), Expand(String, String, bool), NavBack, TreeMove(String, String, Option<String>, Option<usize>), ContextMenu(String, String), Menu(String), ToolbarPress(String), ToolbarToggle(String, bool), DialogScripted(bool), AssertPresented(Option<String>), Respond(Option<usize>), RespondText(String),
}
Expand description

What a drive asks of the app, in dayscript’s vocabulary. The engine maps each to the step a script would send, so a drive and a script mean the same thing by the same words.

Variants§

§

Tap(String)

§

Input(String, String)

§

Toggle(String, bool)

§

SetValue(String, f64)

§

Select(String, usize)

§

Focus(String)

§

Submit(String)

§

Navigate(String)

§

WaitIdle

§

Pause(f64)

§

Shot(String)

Capture the window under this name into the test’s record.

§

AssertText(String, String)

§

AssertVisible(String)

§

AssertMissing(String)

§

AssertHidden(String)

That an element is not on screen: missing, empty, or natively hidden.

§

Hover(String, Option<(f64, f64)>)

A pointer entering an element, at a point in it or (for None) its center.

§

HoverLeave(String)

The pointer leaving an element.

§

Pan(String, f64, f64)

A two-finger pan over an element, by this much in total.

§

Pinch(String, f64)

A pinch over an element, to this cumulative scale.

§

Drag(String, (f64, f64), (f64, f64))

A drag over an element, from one point to another in its coordinates.

§

TapAt(String, f64, f64)

A tap at a point in an element’s coordinates.

§

Key(Option<String>, String)

A key press, to an element or (for None) to whatever holds focus.

§

AssertAnnounced(String)

That the app announced this text to the screen reader during the run.

§

AssertValue(String, f64)

§

AssertOn(String, bool)

A toggle’s state.

§

AssertFocused(String, bool)

§

AssertRoute(String)

§

A11yAudit(Option<String>)

§

AssertNative(String, NativeExpect)

The native widget’s own state, as the platform reports it.

§

AssertFrame(String, FrameExpect)

An element’s frame, in Day’s layout and natively.

§

SamplePixel(String, f64, f64, String)

The color at a point of an element (fractions of its frame), #rrggbb.

§

AssertOpenedUrl(String)

A URL the app asked to open during the run.

§

Activate(String, usize)

Activate a list’s row (a double click, Return, a tap on the phones), by position.

§

Reorder(String, usize, usize)

Move a list’s row from one position to another, as a drag-to-reorder commits it.

§

DeleteRow(String, usize)

Delete a list’s row, as the platform’s delete gesture commits it.

§

SwipeRow(String, usize, bool, usize)

Press a row’s swipe action: the list, the row, the edge (true = leading) and the action’s position in that edge’s offer.

§

ScrollTo(String, String)

Scroll a scroll view or list to an edge ("top", "bottom", "leading", "trailing").

§

Expand(String, String, bool)

Expand or collapse a tree’s row, named by its row id.

§

NavBack

Go back one page in the innermost navigation stack.

§

TreeMove(String, String, Option<String>, Option<usize>)

Move a tree’s row (by row id) under a parent (None = the root) at a position.

§

ContextMenu(String, String)

Choose an item, by label, from an element’s context menu.

§

Menu(String)

Choose an app-menu item by its id.

§

ToolbarPress(String)

Press a toolbar button, by item id.

§

ToolbarToggle(String, bool)

Set a toolbar toggle, by item id.

§

DialogScripted(bool)

Answer presentations natively (false) or hold them for respond (true).

§

AssertPresented(Option<String>)

That a presentation is pending, with this title where one is given.

§

Respond(Option<usize>)

Answer the pending presentation: a button by position, or dismiss it (None).

§

RespondText(String)

Confirm a prompt with text (including an empty string).

Trait Implementations§

Source§

impl Clone for DriveOp

Source§

fn clone(&self) -> DriveOp

Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl Debug for DriveOp

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl PartialEq for DriveOp

Source§

fn eq(&self, other: &DriveOp) -> bool

Equality operator ==. Read more
1.0.0 (const: unstable) · Source§

fn ne(&self, other: &Rhs) -> bool

Inequality operator !=. Read more
Source§

impl StructuralPartialEq for DriveOp

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
§

impl<T> AnyEq for T
where T: Any + PartialEq,

§

fn equals(&self, other: &(dyn Any + 'static)) -> bool

§

fn as_any(&self) -> &(dyn Any + 'static)

Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> CloneToUninit for T
where T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dest: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. Read more
§

impl<T> ErasedDestructor for T
where T: 'static,

Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> IntoEither for T

Source§

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 more
Source§

fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
where F: FnOnce(&Self) -> bool,

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
Source§

impl<T> ToOwned for T
where T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
Source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.