C# Having issues with UIAutomation Reference- get_BoundingRectangle() method not found

1

Creating a C# Console app in VS 20019

I have imported UIAutomationTypes & UIAutomationClient

I try to add my Handler

Automation.AddAutomationEventHandler(
               eventId: WindowPattern.WindowOpenedEvent,
               element: AutomationElement.RootElement,
               scope: TreeScope.Children,
               eventHandler: OnWindowOpened);

When running the application I get the error

System.MissingMethodException HResult=0x80131513 Message=Method not found: 'System.Windows.Rect System.Windows.Automation.Provider.IRawElementProviderFragment.get_BoundingRectangle()'. Source= StackTrace:

I have not programmed in a few years, any help would be nice.

Thanks in advance.

c#
asked on Stack Overflow May 24, 2020 by Chris

0 Answers

Nobody has answered this question yet.


User contributions licensed under CC BY-SA 3.0