Double tree nodes in DOM

Technology specific object identification, supported applications, web technologies, and 3rd party controls.
arutscheidt
Posts: 25
Joined: Mon Jan 12, 2015 8:10 am

Double tree nodes in DOM

Post by arutscheidt » Wed Jul 26, 2017 10:14 am

Hello everybody,

I'm writing tests for the ETS5 Programm (proprietary KNX tool) and having problems with the DOM.

As you can see in the screenshot I have the same node two times. Even if I use an index in the path it will detect two identical nodes.

Inside the nodes are lists of elements (Buttons, TreeItems,...). Now I want to iterate over these element lists and do something.

If I search for these elements I will get them twice, too. So I have to use List.Distinct() and implement an IEqualityComparer for every list to get only one element each for the iteration.

Because the double nodes are so high in the hierarchy I have to handle that very often.
Search operations cost very much time and thwart my tests.

The only option I found is to use the ChildIndex Property, because this is constant. But it dosn't seem to work or I am too dumb?

Are ther any other options?

Is it a Ranorex error or ETS5 ?

Thx in advance
Attachments
doubleTreeNodes.zip
snapshot
(741.17 KiB) Downloaded 22 times
screen01.jpg
screen01.jpg (826.48 KiB) Viewed 477 times
Using Ranorex Studio 8.0.1

User avatar
RobinHood42
Posts: 238
Joined: Fri Jan 09, 2015 3:24 pm

Re: Double tree nodes in DOM

Post by RobinHood42 » Wed Jul 26, 2017 10:45 am

Hi arutscheidt,

Reg. your signature: "Using Ranorex Studio 5.3.2" - I guess this needs to be updated :lol:

Reg. the snapshot, I would recommend restoring all Rx settings and also maybe performing a clean re-install of Rx Studio. The snapshot works fine for me:
doubletreenodes.png
doubletreenodes.png (24.97 KiB) Viewed 471 times
Cheers,
Robin 8)

arutscheidt
Posts: 25
Joined: Mon Jan 12, 2015 8:10 am

Re: Double tree nodes in DOM

Post by arutscheidt » Wed Jul 26, 2017 10:50 am

Ah yeah... using 7.1 is correct :-)

I'll try and post again. Thanx Robin.
Using Ranorex Studio 8.0.1

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

Re: Double tree nodes in DOM

Post by odklizec » Wed Jul 26, 2017 10:56 am

Robin, the reason why you see just one tablist is the index at the end of xpath ;) Remove it and you will see everything under WorkspaceDocking list doubled.

I think it's actually a bug in the AUT? I would suggest to examine the AUT with MS Inspect tool. If Inspect shows the controls doubled too, then the problem is most probably in the AUT itself.
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

User avatar
RobinHood42
Posts: 238
Joined: Fri Jan 09, 2015 3:24 pm

Re: Double tree nodes in DOM

Post by RobinHood42 » Wed Jul 26, 2017 11:22 am

Hi odklizec,
Robin, the reason why you see just one tablist is the index at the end of xpath ;) Remove it and you will see everything under WorkspaceDocking list doubled.
The point from arutscheidt was, that he sees the duplicate entries, even when he's using the index (See picture from initial post)
I think it's actually a bug in the AUT? I would suggest to examine the AUT with MS Inspect tool. If Inspect shows the controls doubled too, then the problem is most probably in the AUT itself.
I agree with that :)

Cheers,
Robin

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

Re: Double tree nodes in DOM

Post by odklizec » Wed Jul 26, 2017 12:03 pm

RobinHood42 wrote:Hi odklizec,
Robin, the reason why you see just one tablist is the index at the end of xpath ;) Remove it and you will see everything under WorkspaceDocking list doubled.
The point from arutscheidt was, that he sees the duplicate entries, even when he's using the index (See picture from initial post)
Mea culpa! I missed the part about indexes ;)
Now looking att he screenshot form the original post, it's really weird. The info in status bar says that there was just one element found, but Spy actually shows two tabpagelists? So this alone could very well be a Ranorex 5.x bug? Something indexes-related? Anyway, doubled controls are most probably an AUT issue.
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

arutscheidt
Posts: 25
Joined: Mon Jan 12, 2015 8:10 am

Re: Double tree nodes in DOM

Post by arutscheidt » Wed Jul 26, 2017 12:19 pm

Hello all,

I've got news but no solution.

I reinstalled Ranorex 7.1 -> still double entries.
Ranorex 7.0.1 on another machine -> the same

I inspected the app with Snoop (CodePlex). The tree in Snoop is ok. Only single entries.

Maybe Ranorex has a bug? It shows doubles in Spy and cannot distinct under test, but the snapshot function is working fine? I downloaded the snap here again and opened it:

Without the SUT open, I have the same like RobinHood and can even distinct with index 1-4. The snap seems to be correct. But when opening the app and the "real" Spy... same behavior.

Maybe you are interested in testing with SUT. It can be downloaded here (https://my.knx.org/) with a demo version, but you have to register.
In it create and open a project. The double nodes are underneath th toolbars in the main area
Using Ranorex Studio 8.0.1

User avatar
Support Team
Site Admin
Site Admin
Posts: 11709
Joined: Fri Jul 07, 2006 4:30 pm
Location: Graz, Austria

Re: Double tree nodes in DOM

Post by Support Team » Wed Jul 26, 2017 2:12 pm

Hello all,

RobinHood42 reported the behavoir to us and it seems to be a bug within Ranorex 7.1.

Currently, we do not know if and when a bug fix will be implemented. This depends on various factors. Nevertheless, all reported bugs and feature requests are documented in the release notes, with every new version release of Ranorex.

As a workaround, we suggest using our UIA plugin which seems to work flawlessly:
WPFSettings.png
WPFSettings.png (28.08 KiB) Viewed 451 times
Please note that the UIA plugin is not compatible with the WPF plugins

Thank you for your understanding.

Sincerely,
Robert
.
Image

arutscheidt
Posts: 25
Joined: Mon Jan 12, 2015 8:10 am

Re: Double tree nodes in DOM

Post by arutscheidt » Wed Jul 26, 2017 2:44 pm

Oh nooo, so I have to rebuild two repositories.

Ok, thanks anyway. I'll look forward to the fix. For now I try the solution with the Distinct()-Method.

If there is time I'll build a second bunch of repos.

Thank you all for help.
Using Ranorex Studio 8.0.1

arutscheidt
Posts: 25
Joined: Mon Jan 12, 2015 8:10 am

Re: Double tree nodes in DOM

Post by arutscheidt » Wed Jul 26, 2017 2:51 pm

Last question:

What will be the future technology for recognition?

Will WPF be the state of the art? or the UI thing?

So I can decide which one I will actively develop and which I use for workarounds.

Thx in advance.

Sincerely,

A. Rutscheidt
Using Ranorex Studio 8.0.1

User avatar
Support Team
Site Admin
Site Admin
Posts: 11709
Joined: Fri Jul 07, 2006 4:30 pm
Location: Graz, Austria

Re: Double tree nodes in DOM

Post by Support Team » Thu Jul 27, 2017 9:39 am

Hello A. Rutscheidt,

To be honest, it highly depends on the application under test.

The UIA plugin relies on the actual UI Automation implementation of the AUT. This accessibility framework provides access to the WPF UI.

The WPFImproved plugin does not rely on this accessibility framework, but rather directly fetches elements from the AUT. This also allows to get elements, which do not have a UIA implementation (no automation peer).

The UIA implementation of your AUT seems pretty good. So, if you can get all elements with UIA, I would currently stick to that plugin.

Further reading on UI Automation: UI Automation Overview

I hope this helps.

Sincerely,
Robert
.
Image