none
IUIAutomation problem finding ancestors RRS feed

  • Question

  • I'm using the following code to find the focused element successfully but I am not having much success finding ancestors when clicking on a ribbon item on Microsoft Outlook, any ideas why?


    IUIAutomationElement element = _automation.GetFocusedElementBuildCache(cacheRequest);
    IUIAutomationElementArray elementArray = element.FindAll(TreeScope.TreeScope_Ancestors, enabledCondition);
    if (elementArray.Length > 0)
        MessageBox.Show("ancestors found", "Testing");

    Tuesday, April 3, 2018 12:00 AM

Answers

All replies