Root '/Element' Instead of Expected Root '/Form'

Technology specific object identification, supported applications, web technologies, and 3rd party controls.
AdrianMY
Posts: 6
Joined: Thu Jun 01, 2017 10:07 am

Root '/Element' Instead of Expected Root '/Form'

Post by AdrianMY » Wed Aug 03, 2022 10:46 am

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).
Composite.png
Composite.png (19.62 KiB) Viewed 424 times

User avatar
odklizec
Ranorex Guru
Ranorex Guru
Posts: 7446
Joined: Mon Aug 13, 2012 9:54 am
Location: Zilina, Slovakia

Re: Root '/Element' Instead of Expected Root '/Form'

Post by odklizec » Mon Aug 08, 2022 8:32 am

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?
Pavel Kudrys
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

AdrianMY
Posts: 6
Joined: Thu Jun 01, 2017 10:07 am

Re: Root '/Element' Instead of Expected Root '/Form'

Post by AdrianMY » Mon Aug 08, 2022 10:11 am

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.

AdrianMY
Posts: 6
Joined: Thu Jun 01, 2017 10:07 am

Re: Root '/Element' Instead of Expected Root '/Form'

Post by AdrianMY » Tue Aug 09, 2022 4:01 pm

Support have confirmed that this is a .Net 6 Core form and is not yet supported by Ranorex.