Page 1 of 1

How to avoid frequent repository changes?

Posted: Fri Jul 10, 2015 7:08 am
by sunil.pandey
Hi,

Please help me to understand below mentioned query:
As per the recommendation Ranorex path is best way to identify the controls/elements
but in case if xpaths keeps changing frequently, Ranorex won't be able to identify controls,
Actually we've faced same issue in Selenium automation.
Please suggest how to make robust repositoy where it can identify control in case of small changes like <tr>, <tb>, index etc..

Thanks & Regards,
Sunil

Re: How to avoid frequent repository changes?

Posted: Fri Jul 10, 2015 7:30 am
by odklizec
Hi,

There is unfortunately no "magic" and always working solution to frequently changing xpaths. The best you can do is to find unique identification attributes, which are persistent. If there are no such attributes in your tested apps, you will have to use relative paths and functions described here:
http://www.ranorex.com/support/user-gui ... xpath.html

In many cases, you can find an element by first identifying completely different element and then by using relative paths and functions navigate to the correct one.

I would recommend you to read this article:
http://www.ranorex.com/blog/automated-t ... ynamic-ids

and watch these xpath related screencasts:
http://www.ranorex.com/support/screencasts.html#c2667
http://www.ranorex.com/support/screencasts.html#c2669