Page 1 of 1

Wrong flavor from spy

Posted: Fri Apr 18, 2014 10:49 am
by biriuck
Hi,

I have a big problem with element flavor for a tree. From ranorex spy i have "wpf" and at runtime is "msaa".
Any ideas on that behavior?

It's a problem for me because I have a custom framework for our automation and the keyword implementation is based on the element flavor (our AUT is a mix of technologies) and i need to know on what type of controls I need to code (it's the WpfTreeImpl.cs, MsaaTreeImpl.cs or Win32TreeImpl)

Re: Wrong flavor from spy

Posted: Tue Apr 22, 2014 7:17 am
by biriuck
Ranorex version is 4.0.5 (my AUT is crashed with a newer version!) and the OS is Win 7 :roll:

Re: Wrong flavor from spy

Posted: Wed Apr 23, 2014 9:09 am
by Support Team
Hi,

May I ask you to post or send (to [email protected]) a Ranorex snapshot file of your tree element?
What do you mean with at runtime is "msaa", how do you check which flavor is used? Do you get a element not found exception at runtime?

Regards,
Markus

Re: Wrong flavor from spy

Posted: Wed Apr 23, 2014 9:16 am
by biriuck
I will send the snapshot to that e-mail.
The element is found but has not the same Flavor as in Spy. I'm able to log the element flavor with log4net from my automation framework (C# code with Ranorex.Core.dll as reference +Ranorex.Plugin.Msaa.dll,Ranorex.Plugin.Wpf.dll,Ranorex.Plugin.WinForms.dll and Ranorex.Plugin.Win32.dll)

Thank you

Re: Wrong flavor from spy

Posted: Wed Apr 23, 2014 9:20 am
by biriuck
Here is the snapshot

Re: Wrong flavor from spy

Posted: Fri May 02, 2014 10:35 am
by Support Team
Hello biriuck,

Thank you for the Snapshot file. It seems to be correct, but you said that you have the issue during the runtime.

Can you please make sure that the WPF plugin is not disabled in your code.
Please make sure that there is no code like the following in your solution.
Ranorex.Plugin.WpfFlavor.Instance.Enabled = false;
Regards,
Bernhard

Re: Wrong flavor from spy

Posted: Thu Sep 18, 2014 11:15 pm
by fwason
having an issue between machines - my colleague has create a suite to test our add in for Outlook. I've checked the code out today but it won't run for me because of differences between how the objects under test are identified. using the SPY tool and hovering over the New Email button in Outlook 2010, my colleague's spy presents a popup window with this info:
Role: button
Caps: uiautomation, uiautomationinvoke
flavor: wpf
classname: NetUIRibbonButton


When I do the same on my machine, I get
Role: button
Caps: accessible
flavor: msaa
classname: [missing from my system]

My guess is that there is a configuration which controls this. We are using the same check out version from SVN, so it isn't the code... it must be a setting. I'm not missing any references....

Re: Wrong flavor from spy

Posted: Thu Sep 18, 2014 11:23 pm
by fwason
we aren't using the repository. The element assignment is:
Button newEmail = "/form[@title~'^Inbox']/?/?//*/button[@name='New E-mail']";

works on one machine and not the other

Re: Wrong flavor from spy

Posted: Fri Sep 19, 2014 6:48 am
by biriuck
Is the same operating system?
Is the same ranorex version installed on both machines?

Re: Wrong flavor from spy

Posted: Fri Sep 19, 2014 9:16 pm
by fwason
yes, each machine is Win7 64 bit, with all the same patches (controlled by group policy). Ranorex versions are the same (5.1.1.18898), and the Office versions are the same. My colleague's system picks up the UIAutomation library I guess (based on other posts) but my system doesn't.

in addition, today her system stopped recognizing the body of an Outlook email as a WordDocument; it is now recognized as an Element. Therefore, the code no longer will focus (we got around it by tabbing) in order to create a message.

I feel as though there are settings which are being modified, but I don't know what they are. I believe this to be the case because the one thing which occurred yesterday which hasn't happened in the past month is that I had her create an SVN repository and check in the code. perhaps the act if checking in\out and committing from 2 systems has caused some Ranorex project or system settings to change?

Re: Wrong flavor from spy

Posted: Mon Sep 22, 2014 3:48 pm
by Support Team
Hi fwason,

Is the same version of the .NET framework installed on both machines (Client and Extended version)?
You can also check if the User Account Control setting is set to the same value on both machines.
Please also compare all installed Microsoft components in the Program and Features dialog.

Regards,
Bernhard

Re: Wrong flavor from spy

Posted: Wed Sep 24, 2014 5:19 pm
by fwason
Bernhard,
We've become overly frustrated with this and I opened a bug report here: http://www.ranorex.com/forum/unable-to- ... t6880.html

there is additional information there, including registry entries for .NET installations and snapshots from both machines of the same email. I hope this is enough information to move forward with a resolution.

Re: Wrong flavor from spy

Posted: Fri Sep 26, 2014 1:47 pm
by Support Team
Hi fwason,

I think the easiest way is to have a remote session in order to analyze the issue on your machine directly.
Please send an email to [email protected] in order to tell us when a remote session would be possible for you.

Regards,
Bernhard