Hi,
We have been using GDI capture on a diary control for quite a while with the same GDI class name.
However in a recent build the class name seems to be regenerated each time our application is started
e.g. these are two messages about the same control a few minutes apart looking at the same control -
The class name 'WindowsForms10.Window.8.app.0.138a9ad_r14_ad1' has been added to the list of GDI Capture classes. Ranorex will now try to capture RawText elements within elements having the same class name.
The class name 'WindowsForms10.Window.8.app.0.239ffce_r14_ad1' has been added to the list of GDI Capture classes. Ranorex will now try to capture RawText elements within elements having the same class name.
I know that this will be a developer issue on our application, but our developers don't know what they have changed to make the class name change, so this is a general query to see if anyone has had this issue before and if so how they solved it.
Thanks for any help.
Ian
GDI Class Name Changing Randomly
Re: GDI Class Name Changing Randomly
Hi Ian,
I don't know how to make the class names persistent, but I think there is a simple solution of your problem. The GDI Capture list supports regular expressions. So all you need to do is to replace the changing part of clas sname string with regex. For example, something like this should do the trick...
I don't know how to make the class names persistent, but I think there is a simple solution of your problem. The GDI Capture list supports regular expressions. So all you need to do is to replace the changing part of clas sname string with regex. For example, something like this should do the trick...
Eventually, I would add regexes also to other parts of the string containing version numbers.WindowsForms10\.Window\.8\.app\.0\.(.*)_r14_ad1
Pavel Kudrys
Ranorex explorer at Descartes Systems
Please add these details to your questions:
Ranorex explorer at Descartes Systems
Please add these details to your questions:
- Ranorex Snapshot. Learn how to create one >here<
- Ranorex xPath of problematic element(s)
- Ranorex version
- OS version
- HW configuration
Re: GDI Class Name Changing Randomly
Thanks very much.
That does seem to be working, not sure what it means in terms of object recognition long term though.
That does seem to be working, not sure what it means in terms of object recognition long term though.