Ranorex for AutoCAD Application- some controls go undetected

Ask general questions here.
Raghunath Rajendren
Posts: 7
Joined: Fri Apr 01, 2016 8:34 am

Ranorex for AutoCAD Application- some controls go undetected

Post by Raghunath Rajendren » Fri Apr 01, 2016 10:13 am


We are trying to create automated tests using ranorex for a plugin developed over Autocad (CAD software). We mostly do a recording module, which when ran back, sometimes states that Ranorex "Failed to Find Item (UI element)".

When cross-checked with Ranorex Spy, the item's path obtained here was able to be found/highlighted, but not the ones Studio saves into its repository while recording tests. Because of this, we do a workaround, by collecting the tracked Items from Spy and adding it to the repository in Studio and changing the recording's found RepositoryItems with the equivalent ones from Spy. After this alteration, the same controls are able to be found.

We presume, the same Tracker technology is used by Spy and Studio. If so, what makes it complicated for Studio to collect the item's exact path the first time in a recording ?

Also, some tests which were running successfully once, does not always run Success in the very next instant. FYI, there was no change in the system's environment, OS, or settings, nor there was a change in the AutoCAD , Ranorex settings. We find it very difficult to comprehend. Please help us on this, on what might be the factors affecting the same ?!


User avatar
Ranorex Guru
Ranorex Guru
Posts: 6517
Joined: Mon Aug 13, 2012 9:54 am
Location: Zilina, Slovakia

Re: Ranorex for AutoCAD Application- some controls go undetected

Post by odklizec » Mon Apr 04, 2016 12:34 pm

Hi Raghu,

It's pretty hard (if not impossible) to suggest something meaningful without some more details. Please answer the below questions:

- Ranorex version?

- Could you please post an exact error you are getting while running your test?

- Could you please upload an example xpath recorded by Ranorex and the xpath found with Spy?

- Could you please post a Ranorex snapshot of the problematic element(s)?

My best guess is that some parts of recorded xpaths are changing with each application run? Most probably some IDs or index numbers? Unfortunately, some apps dynamically change element's IDs/indexes and so after recording xpaths to repository, you must perform cleanup and optimization of recorded xpaths.

Additionally, if the problem is really caused by the dynamic IDs, you may want to change the Ranorex xpath weight rules. This would instruct Ranorex to use different element instead of the one with dynamically created ID. Please follow this blog article about how to work with dynamic IDs:
http://www.ranorex.com/blog/automated-t ... namic-ids/
Pavel Kudrys
Ranorex explorer at Descartes Systems

Please add these details to your questions:
  • Ranorex Snapshot. Learn how to create one >here<
  • Ranorex xPath of problematic element(s)
  • Ranorex version
  • OS version
  • HW configuration