Operating System: Microsoft Windows Server 2022 Data Centre
Ranorex: 10.2.2
Previously working scripts are now encountering something I haven't seen before in the latest build of some Windows software I test. Instead of the previously encountered root '/Form' this is now a root '/Element' with many child/grandchild '/Element' structures with the 'real' controls interspersed at various points in child levels. All of the '/Element' levels are greyed out in Ranorex Spy. Looking at the root '/Element', the Spy tells me FlavorName = winforms.core. Earlier builds are just FlavorName = winforms
The 'forms' are all working (when manually testing) as they did before, but are no longer...err...forms as far as Ranorex is concerned! Is this expected behaviour when the underlying technology (flavor) changes as seen above?
I've attached an example of where I'm seeing this (it is seen many times in the product).
Root '/Element' Instead of Expected Root '/Form'
Root '/Element' Instead of Expected Root '/Form'
You do not have the required permissions to view the files attached to this post.
Re: Root '/Element' Instead of Expected Root '/Form'
Hi,
Winforms.core tell us that the app under test has been built with .Net Core? I'm not quite sure, but it looks as if Ranorex is not correctly interpreting WinForm forms build with .Net Core? I would suggest to contact Ranorex support about this behavior. And in a meantime, your only option is to change the xpath. If you want the xpath working both with old and new version of the app, you should use /* instead of /element or /form. But I guess the 'element' keyword should work with 'from' as well?
Winforms.core tell us that the app under test has been built with .Net Core? I'm not quite sure, but it looks as if Ranorex is not correctly interpreting WinForm forms build with .Net Core? I would suggest to contact Ranorex support about this behavior. And in a meantime, your only option is to change the xpath. If you want the xpath working both with old and new version of the app, you should use /* instead of /element or /form. But I guess the 'element' keyword should work with 'from' as well?
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: Root '/Element' Instead of Expected Root '/Form'
Thanks odklizec for your response, greatly appreciated. I've logged a support ticket, so let's see where that goes (I'll try to remember to update this thread). I'm not going to change my scripts at this point as I'm off on another project so this doesn't impact my work presently. I'm also trying to contact the dev lead to understand what happened from their point of view and if the move to core was planned/intentional.
Re: Root '/Element' Instead of Expected Root '/Form'
Support have confirmed that this is a .Net 6 Core form and is not yet supported by Ranorex.
Re: Root '/Element' Instead of Expected Root '/Form'
Retested on 10.5.0, and unfortunately not yet resolved.