Page 1 of 1

Can I Edit Ranorex Object Code Reference Code

Posted: Tue Mar 22, 2016 7:28 am
by thrups6
Hi,
Can we override the repository element RepoItemInfo from the Repository.cs file
Why i wanted to edit is, I am currently running my automation scripts on two versions of the same application . And I see some of the objects change from one version to other . I don't want to create two different repositories for different versions. So trying to handle the changes from the repository code itself. When i edit something in Repository.cs file and when i build everything gets reset . So thought of inheriting and overriding the code. Please help me with this :roll:

Re: Can I Edit Ranorex Object Code Reference Code

Posted: Wed Mar 23, 2016 10:53 am
by Support Team
Hello thrups6,

what exactly changed in your application. If there are just a few elements with a different RanoreXPath you could adapt the RanoreXPath in the repository in order to find the elements in both versions. I think this would be easier than overriding the code.
Additionally, maintaining the repository will be more complicated for other people when overriding the repository.
I would suggest working on a copy of your solution for each version if the application changed a lot in the newer version.

Regards,
Bernhard

Re: Can I Edit Ranorex Object Code Reference Code

Posted: Wed Mar 23, 2016 2:55 pm
by Martin
A good informative reference point to overcome your issue could be find here http://www.ranorex.com/support/user-gui ... xpath.html (especially the RanoreXPath with Regular Expressions part).

I have multiple test environments where most of the repository object match between them but there are some odd ones out.