pub enum ElementOp {
Press {
count: u8,
button: MouseButton,
},
Focus,
SetValue {
value: String,
},
SelectText {
start: i64,
end: i64,
},
Perform {
name: String,
},
ScrollTo,
Type {
text: String,
},
}Expand description
What the caller asked to do to one element index.
Variants§
Press
AXPress for the left button. Right uses AXShowMenu when the element
advertises it, otherwise a coordinate click at the element center.
Middle, back, and forward always click the center.
Fields
Mouse button. Defaults to left at the call site.
Focus
Set AXFocused to true.
SetValue
Set AXValue. Refused on secure fields.
SelectText
Set AXSelectedTextRange. Refused on secure fields.
Perform
AXUIElementPerformAction with an allowlisted name.
ScrollTo
AXScrollToVisible only.
Type
Prefer AXValue when the attribute is settable, otherwise focus and type.
Implementations§
Source§impl ElementOp
impl ElementOp
Sourcepub fn action_name(&self) -> &'static str
pub fn action_name(&self) -> &'static str
JSON action name.
Sourcepub fn writes_text(&self) -> bool
pub fn writes_text(&self) -> bool
Writes text or a selection. Secure fields refuse these.
Trait Implementations§
impl Eq for ElementOp
impl StructuralPartialEq for ElementOp
Auto Trait Implementations§
impl Freeze for ElementOp
impl RefUnwindSafe for ElementOp
impl Send for ElementOp
impl Sync for ElementOp
impl Unpin for ElementOp
impl UnsafeUnpin for ElementOp
impl UnwindSafe for ElementOp
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key and return true if they are equal.