problem with ranorex repository elements in wpf

Technology specific object identification, supported applications, web technologies, and 3rd party controls.
Posts: 49
Joined: Thu Aug 20, 2009 11:28 am

problem with ranorex repository elements in wpf

Post by chrisgeorge » Thu Mar 29, 2012 12:02 pm


We have an extensive Ranorex repository that covers both Sql Server Management studio, and our plugin product. This was developed to run on SSMS 2005 and SSMS 2008.

We are currently working to support the new SSMS 2012 which is majorly WPF.

Most of the objects in our ranorex repository are still valid in principle, however where they used to identify using "controlname", they now need to use "automationid" in the path to work with SSMS 2012.

There are two options open to us.

1. store and maintain a duplicate repository where the paths differ just by the name of some of the attributes. (eg controlname -> automationid)

2. for every object in our repository, write wrapper functions that get the repository path, and replace controlname with automation id.

Neither option fills our hearts with joy.

So I'm after some ideas.... is there a way to do this 'conversion' with the minimal of effort?

Chris George
Test Engineer

Red Gate Software Ltd

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

Re: problem with ranorex repository elements in wpf

Post by Support Team » Thu Mar 29, 2012 4:13 pm


If just the attributes changed you can use the "or" statement in your RxPath to find the element in both versions:
/yourElement[@controlname='theName' or @automationid='theId']
Ranorex Support Team