Page 1 of 1

Object Identification Inconsistency

Posted: Fri Sep 02, 2011 4:49 pm
by chandrakanth_m
I have my Ranorex Scripts which works in the same environment on the same version of the application. Each time I run the script the results vary. An object X which was recognized and performing well in one iteration will fail to be recognized in the next one.. Can someone help me understand why this might happen..

Thanks
Chandrakanth

Re: Object Identification Inconsistency

Posted: Fri Sep 02, 2011 9:47 pm
by Ciege
Can you post your code and a RanorexSpy snapshot of the AUT for when it works and another snapshot for when it fails?

Re: Object Identification Inconsistency

Posted: Mon Sep 05, 2011 7:24 am
by chandrakanth_m
I am afraid I cannot put the code or the screen shot as we work in secure environment and cant share code or screenshots. But please help me understand how the AUT will be different at runtime?

Re: Object Identification Inconsistency

Posted: Mon Sep 05, 2011 11:59 am
by Support Team
Hi,

Sometimes Ranorex takes attributes for the object identification and the RxPath which are not static/unique.
I mean that some attributes can change after each restart of your AUT.
One of these attributes is the "id", if you are using such an element it could be that the id of the specific elements change after each restart of your AUT.
In many cases the developers set an unique id for each element, but in some cases these ids are changing, if so you have to select another attribute for the identification of the specific element.
Therefore you have to check if you are using dynamical attributes in your RxPath, you only have to "spy" the object X before the restart of the AUT and after it. If the two RxPaths are not the same you have to eliminate the dynamical attributes.
Please also take a look at the following links:
http://www.ranorex.com/blog/ranorexpath-tips-and-tricks
http://www.ranorex.com/blog/eliminate-d ... norexpaths

Regards,
Markus
Ranorex Support Team