pub enum Target {
Uia(Box<Selector>),
Ref(u32),
Name(String),
Id(String),
Role(String),
RoleAt(String, u32),
IdAt(String, u32),
Coord(i32, i32),
}Variants§
Uia(Box<Selector>)
Strict conjunction with an optional unique container scope.
Ref(u32)
snapshot 中的第 N 个可交互元素(DFS 序重放)
Name(String)
Name 子串匹配(首个命中)
Id(String)
AutomationId 精确匹配
Role(String)
ControlType 精确匹配(如 Button)
RoleAt(String, u32)
ControlType + 1 起序数(role:Button#2 = 第 2 个 Button;fallback 链 L3)
IdAt(String, u32)
AutomationId + 1 起序数(id:RootWebArea#2 = 第 2 个同名 id)——多文档
页的确定性寻址(iframe/扩展弹层会让同一 AutomationId 出现多次;
2026-09-27 三连踩后补,与 RoleAt 同机制)
Coord(i32, i32)
屏幕物理坐标(xy:1420,856;负值合法——多显示器左侧屏)。
视觉兜底的“手“:坐标来自调用方(screenshot+VLM/人),不经元素定位;
强制 –app + –physical(窗口边界守卫,06 §7)
Implementations§
Trait Implementations§
impl Eq for Target
impl StructuralPartialEq for Target
Auto Trait Implementations§
impl Freeze for Target
impl RefUnwindSafe for Target
impl Send for Target
impl Sync for Target
impl Unpin for Target
impl UnsafeUnpin for Target
impl UnwindSafe for Target
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