Page 1 of 1

Re-script for object identification, how to avoid

Posted: Wed Apr 08, 2015 12:19 am
by Vijay
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.

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

Posted: Thu Apr 09, 2015 9:32 am
by odklizec
Hi,

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?

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

Posted: Thu Apr 09, 2015 3:19 pm
by Support Team
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.

Regards,
Markus