Page 1 of 1

Programmatically set base path on repository?

Posted: Thu Aug 27, 2009 3:13 pm
by chrisgeorge
Hi,

Is there a way to set the base path of an application in the element repository from my test code? We run several instances of the application under test and have to define the application form by unique rxpaths.

To eliminate the chance of any problems I also want to do that when using elements from the repository.

Is this possible? I don't want to change any code in my generated .cs file as it will be changing for a while yet.


Thanks

Chris

Re: Programmatically set base path on repository?

Posted: Thu Aug 27, 2009 4:17 pm
by Support Team
Chris,
You can set the BasePath property on the folder you wish to modify e.g.:
yourRepo.FormApp1.BasePath = "/form[@processname='yourapp' and @title='...'";
The basepath can be changed for every rooted or application folder.
You can also change timeouts and caching behavior in the same manner.

Michael
Ranorex Team

Re: Programmatically set base path on repository?

Posted: Fri Aug 28, 2009 8:22 am
by chrisgeorge
ah cool! :-) Thanks guys!