WPF/UIA object recognition

Technology specific object identification, supported applications, web technologies, and 3rd party controls.
Kostja
Posts: 6
Joined: Tue Apr 12, 2016 8:28 am

WPF/UIA object recognition

Post by Kostja » Fri Apr 15, 2016 2:36 pm

Ranorex Version: 5.4.6 Windows: Windows 10

Hello,

while testing my AUT i experienced following problem: when i set the setting WPF Legacy/UIA Interaction to WPF only then all objects are recognized, but the adapters are all Unknown and the tables are not recognized as <Table>, so table validation (for example) fails.
tab_wpf.rxsnp
(618.08 KiB) Downloaded 75 times
When set to UIA only, then all objects are recognized correctly with their adapters, but the <Table> adapter does not contain any row respectively the objects are not recognized as rows and the table validation always succeeds no matter the content.
tab_uia.rxsnp
(280.16 KiB) Downloaded 47 times
Furthermore (see the UIA_tree snapshot) when i change the menu item from one to another (e.g. Favoriten to Basismodule) then the element browser does not update the tree (the pictures updates but not the elements) and i can't select any item within the menu item.
UIA_tree.rxsnp
(208.93 KiB) Downloaded 49 times
My question is: Is it possible to extend the recognition of one of the settings to get one of them (preferably WPF only) to work without any shortcomings?

Btw i set the settings for MSAA all to false, so ranorex won't have any problems with overlapping Windows.

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

Re: WPF/UIA object recognition

Post by odklizec » Mon Apr 18, 2016 11:49 am

Hi,

Have you tried to change the WPF options, particularly "Show All Elements" and "Realize Items in Virtualizing Containers"?
WPFPluginSettings.png
WPFPluginSettings.png (20.79 KiB) Viewed 1727 times
At first, try to enable both options together with WPF Legacy/UIA Interaction set to wpfPreferred. Then try to track the problematic elements again.
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

Kostja
Posts: 6
Joined: Tue Apr 12, 2016 8:28 am

Re: WPF/UIA object recognition

Post by Kostja » Mon Apr 18, 2016 3:53 pm

Hi,

thank you for your reply. I already had changed the options in nearly every single variation (desperate deed), but there were no changes in the recognition.

Actually how would WPF Preferred change anything in the recognition since both WPF and UIA have got their paths?

Is there anything else i could do? Because the screenshot validation is too error-prone and to validate each single cell is also not the ideal solution.

Thanks in advance.

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

Re: WPF/UIA object recognition

Post by odklizec » Tue Apr 19, 2016 8:15 am

Hi,

I just noticed the the table in question is actually a devexpress control? Unfortunately, the devexpress controls (especially grid/tables/trees) are known for their non-standard accessibility (automation unfriendly) implementation. And this is probably a main source of your problems. You can find many posts about devexpress controls here at forum.

Just to be sure it's not a Ranorex issue, I would suggest you to contact directly Ranorex support at [email protected]. They may need an access to your app, or at least a remote session with you, so they can see and debug the problem online.

BTW, a partial solution could be something called "Invoke Remotely", but I was never in a need to use this kind of trick so I can't help you here. But there are some posts regarding Invoke Remotely so give it a try. Anyway, this will most probably not help with better table structure recognition. Just with reading the content of 'cells' elements in wpf mode.
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

Kostja
Posts: 6
Joined: Tue Apr 12, 2016 8:28 am

Re: WPF/UIA object recognition

Post by Kostja » Tue Apr 19, 2016 8:41 am

Hi,

thank you for your help and guidance.

I already read several threads about issues with devexpress, but since the most issues were with object recognition itself not with their types/adapters i hoped maybe there's still an easy way to solve this issue of mine ;-).

Hope the support can help me to find a solution for this tricky dilemma.

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

Re: WPF/UIA object recognition

Post by Support Team » Thu Apr 21, 2016 1:28 pm

Hi Kostja,

In order to analyze this issue in more detail, we would need more information about your AUT and your environment. Therefore I would suggest getting in touch with us by email ([email protected]). Afterwards we can discuss the next steps personally.

I’m looking forward to your email. We would be happy to help you with this.

Sincerely,
Matthias
.
Image

Kostja
Posts: 6
Joined: Tue Apr 12, 2016 8:28 am

Re: WPF/UIA object recognition

Post by Kostja » Fri Apr 22, 2016 7:38 am

Hi Matthias,

I already sent the files and a description of this issue to one of your test automation engineers.

Hope you can help me.

Thank you

udaykiran
Posts: 1
Joined: Fri May 06, 2016 12:39 pm

Re: WPF/UIA object recognition

Post by udaykiran » Fri May 06, 2016 12:45 pm

Hi,

I am using WPF application I am not able to find locators in the application . It is identifying only window panels. Can you suggest me the solution how to identify locators.

Tecnologies used in our application:

awesomium web control v1.7.5.1

chrome 18.x

Regards,
Uday

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

Re: WPF/UIA object recognition

Post by odklizec » Fri May 06, 2016 1:29 pm

Hi,

There is an ongoing discussion regarding the awesomium:
http://www.ranorex.com/forum/does-ranor ... t9334.html

I would suggest you to contact directly Ranorex support. Send them a Ranorex snapshot from your app, or even better, a small sample app with integrated awesomium browser. However, as mentioned in the above post, there is a high probability Ranorex may not be able to identify controls within the embedded browser. Ranorex ability to recognize controls depends on Ranorex plugin, specifically designed for each browser and which needs to be loaded within the browser. And this is apparently not possible in embedded browsers.
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