Your Products have been synced, click here to refresh
var windowNames = new string[] { "PC-DMIS CAD++ 2021.1 (release) - Offline", "Execution ", "PC-DMIS Message", "OK" }; AutomationElement currentLayer = AutomationElement.RootElement; foreach(var windowName in windowNames) { if(currentLayer == null) { throw new NullReferenceException($"Automation Element not found windowName: {windowName}"); } var condition = new PropertyCondition(AutomationElement.NameProperty, windowName); currentLayer = currentLayer.FindFirst(TreeScope.Children, condition); } var invokePattern = currentLayer.GetCurrentPattern(InvokePattern.Pattern) as InvokePattern; invokePattern.Invoke();
Condition condition = new PropertyCondition(AutomationElement.NameProperty, "PC-DMIS CAD++ 2021.1 (release) - Offline"); AutomationElement pcdWindow = AutomationElement.RootElement.FindFirst(TreeScope.Children, condition); condition = new PropertyCondition(AutomationElement.NameProperty, "Execution "); AutomationElement executionWindow = pcdWindow.FindFirst(TreeScope.Children, condition); condition = new PropertyCondition(AutomationElement.NameProperty, "PC-DMIS Message"); AutomationElement pcdMessageWindow = executionWindow.FindFirst(TreeScope.Children, condition); condition = new PropertyCondition(AutomationElement.NameProperty, "OK"); AutomationElement okButton = pcdMessageWindow.FindFirst(TreeScope.Children, condition); var invokePattern = currentLayer.GetCurrentPattern(InvokePattern.Pattern) as InvokePattern; invokePattern.Invoke();
© 2024 Hexagon AB and/or its subsidiaries. | Privacy Policy | Cloud Services Agreement |