Cannot click on object using a property other than full name
Hi,
I work on a desktop application developed on .NET, the objects are clicked identifying the full name property. I want to change this WPF property and try to identify the object through WPFAutomationID which is a customized property for my application. The problem with this property is no operation like click,set,enter can be performed using it. Can you please let me know how this can be used.
Full name : Sys["Process"]("NEOinsights")["WPFObject"]("HwndSource: ApplicationWindow", "ZEISS NEO insights - New project ")["WPFObject"]("ApplicationWindow", "ZEISS NEO insights - New project ", 1)["WPFObject"]("Grid", "", 1)["WPFObject"]("_Progress")["WPFObject"]("DockPanel", "", 1)["WPFObject"]("Grid", "", 1)["WPFObject"]("Grid", "", 1)["WPFObject"]("ContentControl", "", 1)["WPFObject"]("_DefaultLayoutView")["WPFObject"]("DockPanel", "", 1)["WPFObject"]("LayoutGrid")["WPFObject"]("ToolBar", "", 1)["WPFObject"]("StackPanel", "", 1)["WPFObject"]("_InnerPanel")["WPFObject"]("ListBoxItem", "", 1)["WPFObject"]("ToolBarCategoryView", "", 1)["WPFObject"]("DockPanel", "", 1)["WPFObject"]("UIButtonBar", "", 1)["WPFObject"]("ContentPresenter", "", 1)["WPFObject"]("ToolBarGroupView")["WPFObject"]("Grid", "", 1)["WPFObject"]("AutomationContentControl", "", 1)["WPFObject"]("ToggleButtonView", "", 1)["WPFObject"]("Grid", "", 1)["WPFObject"]("_TButton") ----- This works
With automationID
Sys["Process"]("NEOinsights")["WPFObject"]("HwndSource: ApplicationWindow", "ZEISS NEO insights - New project ")["WPFObject"]("ApplicationWindow", "ZEISS NEO insights - New project ", 1)["WPFObject"]("Grid", "", 1)["WPFObject"]("_Progress")["WPFObject"]("DockPanel", "", 1)["WPFObject"]("Grid", "", 1)["WPFObject"]("Grid", "", 1)["WPFObject"]("ContentControl", "", 1)["WPFObject"]("_DefaultLayoutView")["WPFObject"]("DockPanel", "", 1)["WPFObject"]("LayoutGrid")["WPFObject"]("ToolBar", "", 1)["WPFObject"]("StackPanel", "", 1)["WPFObject"]("_InnerPanel")["WPFObject"]("ListBoxItem", "", 1)["WPFObject"]("ToolBarCategoryView", "", 1)["WPFObject"]("DockPanel", "", 1)["WPFObject"]("UIButtonBar", "", 1)["WPFObject"]("ContentPresenter", "", 1)["WPFObject"]("ToolBarGroupView")["WPFObject"]("Grid", "", 1)["WPFObject"]("AutomationContentControl", "", 1)["WPFObject"]("ToggleButtonView", "", 1)["WPFObject"]("Grid", "", 1)["WPFObject"]("_TButton")["WPFControlAutomationId"]("ToolBar ToggleButton") ---- This doesnt work