Turn off Object Repository Exceptions

Class library usage, coding and language questions.
User avatar
Posts: 10
Joined: Wed Oct 05, 2011 9:41 pm

Turn off Object Repository Exceptions

Post by Gh15ty » Fri Nov 14, 2014 1:34 pm

We are using Ranorex in a custom framework built using Visual Studio (c#) but still using the Object Repository.

The only problem we have (more slight annoyance) is that the code generated from the repo is set to throw an exception on the CreateAdapter method by default.

Code: Select all

            public virtual Ranorex.Button but_OK
                    return _but_okInfo.CreateAdapter<Ranorex.Button>(true);
We currently have a step in our build process to edit the exported code pre-build and change 'throwException' to false, but that isn't ideal.

Is there a setting in the repo or something like a T4 template we can change so that the code is always exported with 'throwException' set to false?


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

Re: Turn off Object Repository Exceptions

Post by Support Team » Mon Nov 17, 2014 11:33 am

Hello Gh15ty,

Unfortunately, it is not possible to modify the code generation of our repository.