You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I'm working something where I need to discover an element through a walker, and then later interact with it by its RuntimeId. I may be using the API wrong, but the most obvious (to me) way crashes with (exit code: 0xc0000005, STATUS_ACCESS_VIOLATION).
In the below MVBR, for simplicity sake, I'm skipping the walker and just trying to find the root element a second time using the result of root.get_runtime_id().
use uiautomation::core::UIAutomation;use uiautomation::types::{TreeScope,UIProperty};use uiautomation::variants::*;fnmain(){let automation = UIAutomation::new().unwrap();let root = automation.get_root_element().unwrap();let runtime_id = root.get_runtime_id().unwrap();// exit code: 0xc0000005, STATUS_ACCESS_VIOLATION occurs on next linelet condition = automation
.create_property_condition(UIProperty::RuntimeId,Variant::from(Value::ArrayI4(runtime_id)),None,).expect("Failed to create condition");let element = root
.find_first(TreeScope::Element,&condition).expect("Failed to find element");eprintln!("{}", element.get_name().unwrap());}
The text was updated successfully, but these errors were encountered:
I'm working something where I need to discover an element through a walker, and then later interact with it by its
RuntimeId
. I may be using the API wrong, but the most obvious (to me) way crashes with(exit code: 0xc0000005, STATUS_ACCESS_VIOLATION)
.In the below MVBR, for simplicity sake, I'm skipping the walker and just trying to find the root element a second time using the result of
root.get_runtime_id()
.The text was updated successfully, but these errors were encountered: