Page 1 of 1

indentificate Adorner in a WPF- application

Posted: Wed Feb 03, 2016 1:20 pm
by pbaum
I need to automate UI regression tests for a WPF application using MVVM. The normal buttons and windows seem to work without any trouble. But some elements called Adorners I cannot locate with the spy. For the application it is essential to find these handles. For example the log out function is located in such an adorner.
I heard from the developer that the adorner is located in the visual tree.

If they cannot be found we need to look for another tool for that. :(

Can you give me some hints how I can grab the Adorners and verify that they are displayed?

Thank you in advance!

Re: indentificate Adorner in a WPF- application

Posted: Wed Feb 03, 2016 5:04 pm
by odklizec
Hi and welcome here,

I'm afraid, we will need a bit more details to be able to suggest something reliable.

What's your Ranorex version (latest is 5.4.5)?
The 'Adorner' is always active and visible in your app's GUI, or do you need to perform some mouse/keyboard steps to invoke it? If it's kind of tooltip-like control, available on mouse over, you may need to use Ctrl+Win shortcut key to be able to track such element. Please check this Ranorex user guide paragraph about instant tracking... http://www.ranorex.com/support/user-gui ... html#c3181
Are you able to track the problematic element with Ranorex Spy, but Spy is not able to identify the individual items inside of 'Adorner'?
Could you please post a Ranorex snapshot (not screenshot) taken from your app? Learn how to create one >here<.
And finally, could you please post a sample app with 'Adorner'? Eventually, send it to [email protected] along with description of your problem.

Re: indentificate Adorner in a WPF- application

Posted: Thu Feb 04, 2016 11:11 am
by pbaum
Thank you for your fast reply!

I will try to answer your questions as goog as possible. I cannot talk to the developer today because he is not in the Office until early next week.

Currently we are using Ranorex Version 5.4.4.26486.

The Adorner is not always visible. At the Moment there are two Kind of Adorners. The first one is shown when hover the mouse over a button. The second one is displayed when an Action was not successful like a missed log in.
When I open the Adorner menue and then press CTRL+WIN the Options displayed in the menue are not recognized.

What I found out the View Spy identified two Versions of the application window. One is the WPF window and the other one is the UI window. In the UI window the text of the failed log out is displayed. I will provide both Snapshots to the Support.

Unfortunately I cannot provide the application because even zipped it is too big (14 MB). Do you have any other possibility to recieve the application?

Thank you for the answer in advance!

Re: indentificate Adorner in a WPF- application

Posted: Thu Feb 04, 2016 12:40 pm
by odklizec
Hi,
pbaum wrote:Unfortunately I cannot provide the application because even zipped it is too big (14 MB). Do you have any other possibility to recieve the application?
I would suggest to use some kind of file sharing/cloud service, like dropbox, onedrive, google drive, etc. and simply share the link with support. Hope they can help? ;)

Re: indentificate Adorner in a WPF- application

Posted: Mon Feb 15, 2016 9:51 am
by Support Team
Hi all,

We were able to resolve the problem by adding a WPF rule to the section "Always Show Visual Children".
To do so, open the Settings Dialog and switch to the Plug-Ins tab
In this tab, scroll down until WPF Tree and open the editor beside “Always Show Visual Children”
Now, just add the following line at the end of this list:
  • System.Windows.Documents.AdornerDecorator
Regards,
Markus (S)