You can use UIDeskAutomation.Automation3.0 to create automated tasks for Windows applications (both desktop and browser) based on their user interface. This library uses Microsoft Windows Automation API 3.0 (the unmanaged version of UI Automation API which is located in Windows\System32\UIAutomationCore.dll, was introduced starting with Windows 7 and was written as a Component Object Model - COM library).
$ dotnet add package UIDeskAutomation.Automation3.0UIDeskAutomation is a software library that can be used to create automated tasks for Windows applications (both desktop and browser) based on their user interface. It is built using Microsoft Windows Automation API 3.0 which is the latest version of UI Automation, it works generally better and it specifically has an improved support for WPF applications and Windows Store Apps.
More information on how to use this library you can find here: http://automationspy.freecluster.eu/uideskautomation_unmanaged.html
IMPORTANT! When you open the help file (which you can download using the link above) uncheck the "Always ask before opening this file" checkbox (in the "Open File - Security Warning" dialog box, the one that says "Do you want to open this file?") so you can view the content.
Download Samples: http://automationspy.freecluster.eu/Samples.Automation3.0.zip
Download CHM Help file: http://automationspy.freecluster.eu/UIDeskAutomation/UIDeskAutomation.Automation3.0_Help.chm. Don't forget to uncheck the "Always ask before opening this file" checkbox
Download UIDeskAutomationSpy tool: http://automationspy.freecluster.eu/UIDeskAutomation/UIDeskAutomationSpy.Automation3.0.zip. If you encounter difficulties when opening this tool, right click on the spy executable file, choose Properties, check "Unblock" checkbox at the bottom of the dialog box, then Apply and OK.
Source Code: https://github.com/ddeltasolutions/UIDeskAutomation.Automation3.0
Change Log: http://automationspy.freecluster.eu/UIDeskAutomation/ChangeLog3.0.html