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)
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.
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§
impl StructuralPartialEq for DriveOp
Auto Trait Implementations§
impl Freeze for DriveOp
impl RefUnwindSafe for DriveOp
impl Send for DriveOp
impl Sync for DriveOp
impl Unpin for DriveOp
impl UnsafeUnpin for DriveOp
impl UnwindSafe for DriveOp
Blanket Implementations§
§impl<T> AnyEq for T
impl<T> AnyEq for T
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> ErasedDestructor for Twhere
T: 'static,
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> ⓘ
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> ⓘ
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