Skip to main content

UiaElement

Struct UiaElement 

Source
pub struct UiaElement { /* private fields */ }
Expand description

A located UI Automation element.

Implementations§

Source§

impl UiaElement

Source

pub fn get_name(&self) -> Result<String>

Read the Name property.

Source

pub fn get_value(&self) -> Result<String>

Read the Value property (for edit controls, etc.).

Source

pub fn set_value(&self, value: &str) -> Result<()>

Set the Value property.

Source

pub fn invoke(&self) -> Result<()>

Invoke the element’s default action (equivalent to clicking a button).

Source

pub fn bounding_rect(&self) -> Result<(i32, i32, i32, i32)>

Get the bounding rectangle as (x, y, width, height).

Source

pub fn children(&self) -> Result<Vec<UiaElement>>

Enumerate immediate children.

Source

pub fn is_enabled(&self) -> Result<bool>

Return whether the element is currently enabled.

Source

pub fn is_offscreen(&self) -> Result<bool>

Return whether the element is off-screen (not visible).

Source

pub fn get_class_name(&self) -> Result<String>

Read the ClassName property.

Source

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.

Source

pub fn set_checked(&self, checked: bool) -> Result<()>

Set the checked state of a checkbox via IUIAutomationTogglePattern.

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
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> 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, 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.