Wrong flavor from spy

Ask general questions here.
biriuck
Posts: 5
Joined: Fri Apr 18, 2014 10:31 am

Wrong flavor from spy

Post by biriuck » Fri Apr 18, 2014 10:49 am

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)

biriuck
Posts: 5
Joined: Fri Apr 18, 2014 10:31 am

Re: Wrong flavor from spy

Post by biriuck » Tue Apr 22, 2014 7:17 am

Ranorex version is 4.0.5 (my AUT is crashed with a newer version!) and the OS is Win 7 :roll:

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

Re: Wrong flavor from spy

Post by Support Team » Wed Apr 23, 2014 9:09 am

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
.
Image

biriuck
Posts: 5
Joined: Fri Apr 18, 2014 10:31 am

Re: Wrong flavor from spy

Post by biriuck » Wed Apr 23, 2014 9:16 am

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

biriuck
Posts: 5
Joined: Fri Apr 18, 2014 10:31 am

Re: Wrong flavor from spy

Post by biriuck » Wed Apr 23, 2014 9:20 am

Here is the snapshot
Attachments
TreeListSnapshot.rxsnp
Snapshot for wrong flavor
(278.04 KiB) Downloaded 134 times

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

Re: Wrong flavor from spy

Post by Support Team » Fri May 02, 2014 10:35 am

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
.
Image

fwason
Posts: 26
Joined: Wed Aug 24, 2011 10:39 pm

Re: Wrong flavor from spy

Post by fwason » Thu Sep 18, 2014 11:15 pm

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....

fwason
Posts: 26
Joined: Wed Aug 24, 2011 10:39 pm

Re: Wrong flavor from spy

Post by fwason » Thu Sep 18, 2014 11:23 pm

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

biriuck
Posts: 5
Joined: Fri Apr 18, 2014 10:31 am

Re: Wrong flavor from spy

Post by biriuck » Fri Sep 19, 2014 6:48 am

Is the same operating system?
Is the same ranorex version installed on both machines?

fwason
Posts: 26
Joined: Wed Aug 24, 2011 10:39 pm

Re: Wrong flavor from spy

Post by fwason » Fri Sep 19, 2014 9:16 pm

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?

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

Re: Wrong flavor from spy

Post by Support Team » Mon Sep 22, 2014 3:48 pm

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
.
Image

fwason
Posts: 26
Joined: Wed Aug 24, 2011 10:39 pm

Re: Wrong flavor from spy

Post by fwason » Wed Sep 24, 2014 5:19 pm

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.

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

Re: Wrong flavor from spy

Post by Support Team » Fri Sep 26, 2014 1:47 pm

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
.
Image