Page 1 of 1

WPF/UIA object recognition

Posted: Fri Apr 15, 2016 2:36 pm
by Kostja
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
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
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
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.

Re: WPF/UIA object recognition

Posted: Mon Apr 18, 2016 11:49 am
by odklizec
Hi,

Have you tried to change the WPF options, particularly "Show All Elements" and "Realize Items in Virtualizing Containers"?
WPFPluginSettings.png
At first, try to enable both options together with WPF Legacy/UIA Interaction set to wpfPreferred. Then try to track the problematic elements again.

Re: WPF/UIA object recognition

Posted: Mon Apr 18, 2016 3:53 pm
by Kostja
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.

Re: WPF/UIA object recognition

Posted: Tue Apr 19, 2016 8:15 am
by odklizec
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.

Re: WPF/UIA object recognition

Posted: Tue Apr 19, 2016 8:41 am
by Kostja
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.

Re: WPF/UIA object recognition

Posted: Thu Apr 21, 2016 1:28 pm
by Support Team
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

Re: WPF/UIA object recognition

Posted: Fri Apr 22, 2016 7:38 am
by Kostja
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

Re: WPF/UIA object recognition

Posted: Fri May 06, 2016 12:45 pm
by udaykiran
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

Re: WPF/UIA object recognition

Posted: Fri May 06, 2016 1:29 pm
by odklizec
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.