Rx Path has changed to everything being an element

Technology specific object identification, supported applications, web technologies, and 3rd party controls.
orbistest
Posts: 23
Joined: Mon Oct 17, 2011 5:31 pm

Rx Path has changed to everything being an element

Post by orbistest » Mon Sep 23, 2013 4:04 pm

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.

orbistest
Posts: 23
Joined: Mon Oct 17, 2011 5:31 pm

Re: Rx Path has changed to everything being an element

Post by orbistest » Tue Sep 24, 2013 12:14 pm

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.

orbistest
Posts: 23
Joined: Mon Oct 17, 2011 5:31 pm

Re: Rx Path has changed to everything being an element

Post by orbistest » Tue Sep 24, 2013 3:05 pm

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?

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

Re: Rx Path has changed to everything being an element

Post by Support Team » Tue Sep 24, 2013 3:25 pm

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

orbistest
Posts: 23
Joined: Mon Oct 17, 2011 5:31 pm

Re: Rx Path has changed to everything being an element

Post by orbistest » Tue Oct 22, 2013 3:46 pm

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.

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

Re: Rx Path has changed to everything being an element

Post by Support Team » Tue Oct 22, 2013 9:20 pm

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

orbistest
Posts: 23
Joined: Mon Oct 17, 2011 5:31 pm

Re: Rx Path has changed to everything being an element

Post by orbistest » Thu Oct 24, 2013 9:26 am

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.

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

Re: Rx Path has changed to everything being an element

Post by Support Team » Thu Oct 24, 2013 9:54 am

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