I am trying to automate some tools that we use at my company, this tools are developed in WPF and I have noticed that neither the recorders nor UiExplorer can detect them. I tried all options from the UiFrameworks: Default, Active Accessibility and Ui Automation and all them failed to detect any control in a simple code like this one:
Does anyone know what should I enable in UiPath? Because in Windows Forms is capable of detecting any control. Thanks for your recommendation and let’s continue building more robots together!
Despite that image recognition is an option, it’s not what I’d like to do because I could understand this issue if I was programming in Java, Python or any other technology, but not a Microsoft one because even UWP apps like Windows 10 Calendar is recognized by Ui Automation (because I tested it) and WPF is not exactly a very uncommon technology, it has been for a while in the market since 2006; therefore, for sure, I am doing something wrong or I must enable something that I’m not aware of.
I found my own solution and I hope it’s going to help more people. What happens if you are developing with WPF is that you should enable some properties called AutomationProperties and add the Automation IDs to the controls that you want to automate making them discoverable by the tools like in this example:
Personally, I consider this advice should be added somewhere in the documentation or any training of UiPath since many people who works for companies or build their own tools in WPF could experience the same issue that I faced for months because I tried with Automation Anywhere and UiPath and I got the same issue because the lack of these properties.
P.S.
You cannot use it while debugging, you must run the EXE.