Re-script for object identification, how to avoid

Technology specific object identification, supported applications, web technologies, and 3rd party controls.
Certified Professional
Certified Professional
Posts: 7
Joined: Wed Apr 08, 2015 12:04 am

Re-script for object identification, how to avoid

Post by Vijay » Wed Apr 08, 2015 12:19 am

Hi Team,
When I earlier recorded Upload.exe(demo app), ranorex 5.2 identified the elements (such as buttons) with @accessiblename and it worked fine.
Now I have used the project on another computer, here the script when run, didn’t identify the element. When analysed with Ranorex spy, I see the elements no longer have @accessiblename, and hence I had to rescript with @controlname identifier to make this work.
My question are:
1) Why Ranorex didn’t use @controlname when I recorded it earlier (due to weightage?).
2) Can application such as upload.exe expose different identifiers when executed from different PC / Operating systems? What is the safe bet.

I the below screen shot, I have changed @accessiblename to @controlname (along with correct values) for StartFileUpload and ProgressBar and about to fix ResetUI and Close.
You do not have the required permissions to view the files attached to this post.

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

Re: Re-script for object identification, how to avoid

Post by odklizec » Thu Apr 09, 2015 9:32 am


To avoid problems like this, you can use both @accessiblename and @controlname for the element identification. Just add "or" logical operator between them, like this...

Code: Select all

?/?/button[@accessiblename='available_accessiblename' or @controlname='available_controlname']
This should help with identifying the given control on both systems. As for why it happens, there may be something missing/different on that second computer? Does both computers use the same system and have installed the same service packs/runtime libraries? Eventually, there may be a problem with accessibility implementation in your app, which apparently works on one system and don't on another?
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

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

Re: Re-script for object identification, how to avoid

Post by Support Team » Thu Apr 09, 2015 3:19 pm

Hi odklizec and Vijay,

I just want to add that the elements should be identified on every machine/system in the same way, unless the application itself is different.
When the AUT is the same on every machine, Ranorex should also identify it in the same way.
If this is not the case it is likely that some of the prerequisites are not install: System Requirements or that one of the points mentioned in the general troubleshooting section apply: General Troubleshooting.

In general such issues highly depend on the application under test and the technology used. It is therefore recommended to also provide a snapshot of the same elements of the two systems since this would allow us to faster analyze the issue.
Here you can find how to create such a Ranorex snapshot file: Creating Ranorex Snapshot Files.