We use Ranorex 5.4.3 for automation on a C++ MFC application with many custom low-level win32 controls. It works pretty well although we have to use the GDI plug-in to parse messages displayed by application pop-ups (unfortunately, we cannot spy them as simply as we want). However, with this (great) tool, we can dynamically load the GDI plug-in each time we know that a process may display pop-ups, then unload it to save time. We have to save time because currently, we use a very general regex when using the RawTextFlavor class. See below (and let's assume "xxx" is the name of our application process).
Thus, the OCR analysis is applied to the entire application UI and not only the components which really require it.
Code: Select all
For a long time now we were fine with this solution, but we recently detect some problems. The major one is that, for some reasons, confusing OCR parsing may happen where a pop-up message and other text (e.g. on graphic figures) that appear in the UI behind are merged in a single result string. This is a problem because the message analysis is then disturbed, causing a wrong pop-up identification at the end.
We were trying to figure how we can improve the code above in order to apply OCR only on pop-up items. We know we can replace ProcessNames.Add() by ClassNames.Add() but don't find clear examples that explain how to do it. Besides, there could also be some other solutions we don't know yet.
For your information, the pop-up element if Ranorex.Form class.
Also note that one of our target execution platform is an old XP SP2 running on a very specific hardware. We didn't succeed using Ranorex 6 or later on it and for this reason, we cannot upgrade the Ranorex version we use beyond 5.4.7.