pub enum TestCommand {
Show 37 variants
Tap {
x: f32,
y: f32,
},
Drag {
start_x: f32,
start_y: f32,
end_x: f32,
end_y: f32,
steps: u32,
},
TapText {
text: String,
},
ResolveSelector {
query: SelectorQuery,
},
TapSelector {
query: SelectorQuery,
},
ActivateSelector {
query: SelectorQuery,
},
FocusSelector {
query: SelectorQuery,
},
HoverSelector {
query: SelectorQuery,
},
RightClickSelector {
query: SelectorQuery,
},
ScrollIntoView {
query: SelectorQuery,
},
FillText {
query: SelectorQuery,
text: String,
},
ClearText {
query: SelectorQuery,
},
Toggle {
query: SelectorQuery,
},
SelectOption {
query: SelectorQuery,
},
WaitForSelector {
query: SelectorQuery,
timeout_ms: u64,
},
WaitForVisible {
query: SelectorQuery,
timeout_ms: u64,
},
WaitForEnabled {
query: SelectorQuery,
timeout_ms: u64,
},
WaitForDisabled {
query: SelectorQuery,
timeout_ms: u64,
},
WaitForValue {
query: SelectorQuery,
value: String,
timeout_ms: u64,
},
WaitForText {
text: String,
timeout_ms: u64,
},
WaitForGone {
query: SelectorQuery,
timeout_ms: u64,
},
Scroll {
x: f32,
y: f32,
dx: f32,
dy: f32,
},
TypeText {
text: String,
},
ImePreedit {
text: String,
cursor_start: Option<usize>,
cursor_end: Option<usize>,
},
ImeCommit {
text: String,
},
ImeCancel {},
PressKey {
key: String,
modifiers: u8,
},
Screenshot {
path: String,
},
CaptureScreenshot {},
GetText {},
GetTree {},
Wait {
ms: u64,
},
Pump {},
Quit {},
SimulateMouseMove {
x: f32,
y: f32,
},
SimulateRightClick {
x: f32,
y: f32,
},
SimulateResize {
width: u32,
height: u32,
},
}Expand description
A command sent from the test client to the running application.
Serialized with #[serde(tag = "cmd")]. See the crate-level docs for
the full command reference.
Variants§
Tap
Drag
TapText
ResolveSelector
Fields
§
query: SelectorQueryTapSelector
Fields
§
query: SelectorQueryActivateSelector
Fields
§
query: SelectorQueryFocusSelector
Fields
§
query: SelectorQueryHoverSelector
Fields
§
query: SelectorQueryRightClickSelector
Fields
§
query: SelectorQueryScrollIntoView
Fields
§
query: SelectorQueryFillText
ClearText
Fields
§
query: SelectorQueryToggle
Fields
§
query: SelectorQuerySelectOption
Fields
§
query: SelectorQueryWaitForSelector
WaitForVisible
WaitForEnabled
WaitForDisabled
WaitForValue
WaitForText
WaitForGone
Scroll
TypeText
ImePreedit
ImeCommit
ImeCancel
PressKey
Screenshot
CaptureScreenshot
GetText
GetTree
Wait
Pump
Quit
SimulateMouseMove
SimulateRightClick
SimulateResize
Trait Implementations§
Source§impl Clone for TestCommand
impl Clone for TestCommand
Source§fn clone(&self) -> TestCommand
fn clone(&self) -> TestCommand
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for TestCommand
impl Debug for TestCommand
Source§impl<'de> Deserialize<'de> for TestCommand
impl<'de> Deserialize<'de> for TestCommand
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Auto Trait Implementations§
impl Freeze for TestCommand
impl RefUnwindSafe for TestCommand
impl Send for TestCommand
impl Sync for TestCommand
impl Unpin for TestCommand
impl UnsafeUnpin for TestCommand
impl UnwindSafe for TestCommand
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