You can use UIDeskAutomation to create automated tasks for Windows applications based on their user interface. This library uses managed Microsoft UI Automation API (which is part of .NET Framework - System.Windows.Automation namespace).
$ dotnet add package UIDeskAutomationNo README available.