pub struct UiaElement { /* private fields */ }Expand description
A located UI Automation element.
Implementations§
Source§impl UiaElement
impl UiaElement
Sourcepub fn invoke(&self) -> Result<()>
pub fn invoke(&self) -> Result<()>
Invoke the element’s default action (equivalent to clicking a button).
Sourcepub fn bounding_rect(&self) -> Result<(i32, i32, i32, i32)>
pub fn bounding_rect(&self) -> Result<(i32, i32, i32, i32)>
Get the bounding rectangle as (x, y, width, height).
Sourcepub fn children(&self) -> Result<Vec<UiaElement>>
pub fn children(&self) -> Result<Vec<UiaElement>>
Enumerate immediate children.
Sourcepub fn is_enabled(&self) -> Result<bool>
pub fn is_enabled(&self) -> Result<bool>
Return whether the element is currently enabled.
Sourcepub fn is_offscreen(&self) -> Result<bool>
pub fn is_offscreen(&self) -> Result<bool>
Return whether the element is off-screen (not visible).
Sourcepub fn get_class_name(&self) -> Result<String>
pub fn get_class_name(&self) -> Result<String>
Read the ClassName property.
Sourcepub fn select_item(&self, item_name: &str) -> Result<()>
pub fn select_item(&self, item_name: &str) -> Result<()>
Select a named item inside a ComboBox or ListBox.
For ComboBoxes the element is expanded first, then the child whose Name
matches item_name is selected via IUIAutomationSelectionItemPattern.
Sourcepub fn set_checked(&self, checked: bool) -> Result<()>
pub fn set_checked(&self, checked: bool) -> Result<()>
Set the checked state of a checkbox via IUIAutomationTogglePattern.
Auto Trait Implementations§
impl Freeze for UiaElement
impl RefUnwindSafe for UiaElement
impl Send for UiaElement
impl Sync for UiaElement
impl Unpin for UiaElement
impl UnsafeUnpin for UiaElement
impl UnwindSafe for UiaElement
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