Ranorex Studio/Spy ignoring which WPF mode is selected

Bug reports.
uhmdown
Posts: 54
Joined: Mon Apr 03, 2017 12:00 pm

Ranorex Studio/Spy ignoring which WPF mode is selected

Post by uhmdown » Thu May 04, 2017 8:12 pm

Ranorex can end up in a state where it ignores which WPF mode is selected (WpfOnly vs WPFPreferred vs WPFImproved).

I usually know when Ranorex Studio/Spy has gotten into this state because my XPaths are no longer able to reliably find the controls they're supposed to (because the Xpath are written in one mode, and Ranorex is trying to interpret them in a different mode).

When it happens, I feel restarting my PC is the only way to get it working properly again (although I might be mistaken).

I haven't found the exact steps to reproduce yet, but it involves changing WPF mode, and running Ranorex Studio/Spy as Admin I think.
When I find the exact steps, I'll post it here.

(Ranorex 7.0)

jma
Posts: 107
Joined: Fri Jul 03, 2015 9:18 am

Re: Ranorex Studio/Spy ignoring which WPF mode is selected

Post by jma » Fri May 05, 2017 7:41 am

Hi uhmdown,

I guess this issue is caused by incorrect settings. Maybe you mixed up the local and the solution settings? I would suggest having a look at the user guide concerning the Solution settings: https://www.ranorex.com/support/user-gu ... tings.html

I hope this helps!

uhmdown
Posts: 54
Joined: Mon Apr 03, 2017 12:00 pm

Re: Ranorex Studio/Spy ignoring which WPF mode is selected

Post by uhmdown » Fri May 05, 2017 8:52 am

Hi,

Thx for the pointer.

I'm not sure how this explains it though. When I'm in Ranorex Studio with a solution open, and I open the Plugin settings, and it says WpfOnly (and Solution settings at the bottom of the settings window), it shouldn't matter what the local/machine settings are set to.

That being said, I compared the local and solution settings, and they are both set to WpfOnly. So that means it it's probably not due to Ranorex confusing the two.

For some reason, WPF defaults to WpfImproved when triggered by a sequence of steps I am yet to find.

jma
Posts: 107
Joined: Fri Jul 03, 2015 9:18 am

Re: Ranorex Studio/Spy ignoring which WPF mode is selected

Post by jma » Fri May 05, 2017 9:28 am

Hi,

Ranorex introduced an improved WPF plugin in version 7.0, which is enabled automatically if specific requirements are met. Information about those specific cases can be found under the following link: https://www.ranorex.com/support/user-gu ... ug-in.html

If this is also not related to your issue, please post the corresponding steps to reproduce the issue after you figured out the cause :D

uhmdown
Posts: 54
Joined: Mon Apr 03, 2017 12:00 pm

Re: Ranorex Studio/Spy ignoring which WPF mode is selected

Post by uhmdown » Fri May 05, 2017 12:57 pm

It is definitely something to do with Ranorex forcing use of WpfImproved, even though in Settings WpfOnly is chosen.
It's super annoying because for about 15 minutes I'm staring at my xpaths, second guessing myself and thinking I'm 100% blind, when it is in fact Ranorex screwing up.

I just had it happen again.
But haven't spotted a pattern yet.

krstcs
Posts: 2683
Joined: Tue Feb 07, 2012 4:14 pm
Location: Austin, Texas, USA

Re: Ranorex Studio/Spy ignoring which WPF mode is selected

Post by krstcs » Fri May 05, 2017 1:44 pm

Have you tried updating Ranorex to 7.0.1? It was just released. Try that and see if it helps.
Shortcuts usually aren't...

uhmdown
Posts: 54
Joined: Mon Apr 03, 2017 12:00 pm

Re: Ranorex Studio/Spy ignoring which WPF mode is selected

Post by uhmdown » Fri May 05, 2017 1:49 pm

I just had it happen again, This time, it was getting forced into UIA mode (although settings still said WpfOnly), because Ranorex didn't have secrity access to the SUT.
This despite Ranorex was started as administrator.

Maybe it's if Ranorex was started first without Admin, then closed, and then started as Admin?
Is it required that Ranorex is started as Admin the first time?


I haven't installed 7.01 yet (the release notes don't seem to contain any bug fixes that address this).

krstcs
Posts: 2683
Joined: Tue Feb 07, 2012 4:14 pm
Location: Austin, Texas, USA

Re: Ranorex Studio/Spy ignoring which WPF mode is selected

Post by krstcs » Fri May 05, 2017 1:57 pm

Well, just because the notes don't include it specifically doesn't mean that one of the fixes doesn't impact this issue. I would try it.

As for the admin thing, Ranorex recommends starting Ranorex as admin all the time, but it shouldn't matter as long as the SUT doesn't require admin access. As long as Ranorex is started with AT LEAST as high permissions it should be fine.
Shortcuts usually aren't...

uhmdown
Posts: 54
Joined: Mon Apr 03, 2017 12:00 pm

Re: Ranorex Studio/Spy ignoring which WPF mode is selected

Post by uhmdown » Fri May 05, 2017 2:18 pm

The Admin thing I can confirm as a bug (albeit a not-so-severe one).
If you start up Ranorex the first time as non-admin, you can't rectify it by closing it and starting it as Admin (closing SUT and all Ranorex applications, that is). The mode will be forced to UIA. Although I'm guessing it's the specific SUT in question is locked in UIA mode.


Just installed Ranorex 7.01. Lets see if that makes a difference for the WpfImproved mode getting forced.

User avatar
Support Team
Site Admin
Site Admin
Posts: 12145
Joined: Fri Jul 07, 2006 4:30 pm
Location: Houston, Texas, USA
Contact:

Re: Ranorex Studio/Spy ignoring which WPF mode is selected

Post by Support Team » Tue May 09, 2017 1:57 pm

Hi uhmdown,

If you still experience such issues after upgrading to Ranorex 7.0.1, I would suggest contacting [email protected] directly. Then, we could schedule a short remote session to analyze the issue on your machine directly.

Kind regards,
Johannes