Page 1 of 1

Rx Path has changed to everything being an element

Posted: Mon Sep 23, 2013 4:04 pm
by orbistest
I am using Ranorex 3.3.3 and have been for some time. I recorded some scripts a few months ago on this version of Ranorex and have run them several times without problems.
Recently I went back to the machine and attempted to run the same scripts with the same version of Ranorex but the scripts fail. It seems that many Rx Paths have changed from using correct control names (e.g. window) to using element in all cases. Plus there appears to be an extra level of "element" required in the new paths.

When I use the Rx Spy (32 or 64 bit) I can see this problem.
The problem manifests in many areas of the repository not just one section e.g. trees and listitems are now owned by windows such as "element[@class='WTL_OutlookSplitterWindow']/element[@class='WTL_OutlookSplitterWindow']/element[@class='ATL:00537DE8']/element/element[@class='ATL:00535F68']/container/element/element/element/list/listitem[@accessiblerole='ListItem']"

which used to be
"window[@class= ...]/Window[@class= ...] ..." etc.


For another example an item which used to work as
container[@controlname='parametersGroup']/table/row[@accessiblename='Row 0']/cell[@accessiblename='Parameter Value Row 0']

Now appears as
element[@controlname='parametersGroup']/element[@controlname='parametersGrid']/table/row[@accessiblename='Row 0']/cell[@accessiblename='Parameter Value Row 0']

Our programmers have made no changes in this area. They have NOT added ParametersGrid, for example.
However, we do now install the two Visual Studio SP1 items (x86 and x64) and also XML 6.0 SP1 x64 libraries.

Can someone tell me what to look for to get my existing scripts working with the correct object types again?
Have I unknowingly switched on some strange flag? I have not edited any path weights or preferences on the project that I can remember.

Re: Rx Path has changed to everything being an element

Posted: Tue Sep 24, 2013 12:14 pm
by orbistest
Just to let you know. I found that after upgrading our product under test the scripts broke.
As a last resort after trying many other things such as installing windows updates etc. I tried uninstalling and re-installing Ranorex.

Hey presto it works again!

I suspect Ranorex does not like one of the redistributables and when it is re-installed it overwrites these or points to its own versions or something.

Very curious and a whole morning wasted. No one to blame but a real pain.

Re: Rx Path has changed to everything being an element

Posted: Tue Sep 24, 2013 3:05 pm
by orbistest
Ah but sadly this did not work in all cases. I found other scripts where this uninstall and re-install did not make any difference. Has anyone got an idea why or whether installing these three service packs will break ranorex script object recognition?

Re: Rx Path has changed to everything being an element

Posted: Tue Sep 24, 2013 3:25 pm
by Support Team
Hello,

unfortunately, I have never heard about such an issue.
We would like to analyze the issue in more detail.
Could you please send us a Ranorex Snapshot file from your application and your repository?
If it is not allowed to post the files in the forum, you can also write an email to [email protected].
Thank you!

Regards,
Bernhard

Re: Rx Path has changed to everything being an element

Posted: Tue Oct 22, 2013 3:46 pm
by orbistest
Hello - sorry this took some time to respond. I have been experimenting when I can spare the time.

I have found that I get this problem after installation of .NET4.
My platform is Windows 2008 R2 64 bit.

When I run Ranorex 3.3.3 on a platform with .NET 3.5 my objects are correctly identified and the scripts run ok.
I then closed the AUT and Ranorex and updated to .NET4.That is all I did. I changed no path weightings or anything else on the project.

Now when I try to run my script a few of the objects work but quite soon I come to an object which simply is not recognized. If I look with Rx SPY 32 or 64 bit, I get the path containing mostly just "element" such as
/form[@controlname='ConfigForm']/element[@controlname='configTabControl']/element[@controlname='mainTab']/element/element[@controlname='mainTabControl']/element/element[@controlname='btnBrowseSchema']/button[@accessiblename='Browse to XSD/XML File...'].

The original working path (which had been slightly manually adjusted but mostly came from Rx SPY) was
/form[@title='XML Document Import']//tabpagelist/tabpage[@controlname='mainTab']//container/tabpagelist/tabpage[@controlname='schemaTab']/button[@controlname='btnBrowseSchema']

I have tried changing the target under the project options compiling to be various values but this has not helped.
If I uninstall .NET4 the script starts to work again.

So is there anything else I can try to get my scripts to work on .NET4? The next thing is to try Rx version 4 but for our whole team this is a big step.

Re: Rx Path has changed to everything being an element

Posted: Tue Oct 22, 2013 9:20 pm
by Support Team
orbistest wrote:I have found that I get this problem after installation of .NET4.
After you install .NET 4.0, you also have to install Ranorex anew (or repair the installation).

The reason is that Ranorex needs to install some assemblies compiled for .NET 4.0 and you can first install those assemblies when .NET 4.0 is installed...

BTW did you get any technology limitation warning when you tracked you controls after installing .NET 4.0?.

Regards,
Alex
Ranorex Team

Re: Rx Path has changed to everything being an element

Posted: Thu Oct 24, 2013 9:26 am
by orbistest
Well this time I had to uninstall and then re-install to make it work. Repair didn't make any difference and in the past even the uninstall didn't make my script work.

This is not a good feature, :shock: but at least I have a fix. :)

Thanks for the reply.

Re: Rx Path has changed to everything being an element

Posted: Thu Oct 24, 2013 9:54 am
by Support Team
orbistest wrote:This is not a good feature, :shock: but at least I have a fix. :)
As I outlined in my previous post, this is a limitation of the .NET Framework that Ranorex is based on. In order to install Ranorex DLLs needed to recognize .NET 4.0, .NET 4.0 needs to be installed first.
orbistest wrote:...and in the past even the uninstall didn't make my script work.
Not sure that I know what you mean here. That specific problem should always be fixed with uninstalling and reinstalling Ranorex.

Anyway, glad that a reinstall fixed your issue! :D

Regards,
Alex
Ranorex Team