GetRuntimeId() public method

public GetRuntimeId ( ) : int[]
return int[]
Exemplo n.º 1
0
        private void OnStructureChange(object sender, StructureChangedEventArgs e)
        {
            Console.WriteLine($"OnStructureChange {e.StructureChangeType}, {e.EventId}, {e.GetRuntimeId()}");

             var automationElement = AutomationElement.FromHandle(_process.MainWindowHandle);
             _automationElements = automationElement.FindAll(TreeScope.Subtree, Condition.TrueCondition);
        }
Exemplo n.º 2
0
        private void HandleStructureChangedEvent(object sender, UIA.StructureChangedEventArgs structureChangedEventArgs)
        {
            var basicAutomationElement = new UIA2BasicAutomationElement((UIA2Automation)Automation, (UIA.AutomationElement)sender);
            var senderElement          = new AutomationElement(basicAutomationElement);

            HandleStructureChangedEvent(senderElement, (StructureChangeType)structureChangedEventArgs.StructureChangeType, structureChangedEventArgs.GetRuntimeId());
        }