Skip to main content

Desktop

Struct Desktop 

Source
pub struct Desktop {}
Expand description

Entry point for UI automation: enumerate windows and launch applications.

Implementations§

Trait Implementations§

Source§

impl Default for Desktop

Source§

fn default() -> Self

Returns the “default value” for a type. Read more
Source§

impl Desktop for Desktop

Available on non-Windows only.
Source§

type Elem = UIElement

Source§

type Browser = NoBrowser

Source§

fn browser(&self) -> &NoBrowser

CDP browser handle. Used by the workflow engine for browser automation.
Source§

fn application_windows(&self) -> Result<Vec<UIElement>, AutomataError>

All top-level application windows currently visible.
Source§

fn open_application(&self, _exe: &str) -> Result<u32, AutomataError>

Launch an executable by name or full path. Returns the process ID.
Source§

fn foreground_window(&self) -> Option<UIElement>

The element that currently has keyboard focus (topmost modal if a dialog is present). Returns None if the foreground window is unknown.
Source§

fn foreground_hwnd(&self) -> Option<u64>

Raw HWND as u64 for process-ownership checks without a full element query. Returns None on non-Windows or when nothing is focused.
Source§

fn tooltip_windows(&self) -> Vec<Self::Elem>

All currently visible tooltip windows on the desktop. Returns an empty vec on non-Windows or if none are present.
Source§

fn hwnd_z_order(&self) -> Vec<u64>

Top-level window handles in Z-order (topmost first). Read more

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.