Page 1 of 1

Add to / Update Repository

Posted: Fri Apr 01, 2011 3:38 pm
by mfisher1
Hello I am a new user giving the suite an evaluation for suitability to our purposes.

I am looking for a way to add to or update the repository via C# code, so that I can access elements of a web page that were not present prior to the test execution.

At a higher level, I am using a web site form to create a link to the form's information, and I would like to be able to access that link again later in order to continue the testing process.

Thanks!

Re: Add to / Update Repository

Posted: Mon Apr 04, 2011 10:56 am
by Support Team
Hi,

you can update a RanoreXPath in user code but not add a new repository item, which is not neccessary, as the existance of such a repository item will be checked not until it is used.

So, e.g. if you have a link, the existance of this link will checked just before a click or validation action will be performed.

With following property http://www.ranorex.com/Documentation/Ra ... o_Path.htm of the repository item info object, you are able to get and set the RxPath of an item in the repository.

So your code to manually update your RanorexPath should look something like this:
repo.your.adapterInfo.Path = "/your/new/relative/path";
As you are new in using Ranorex I would prefer to read our user guide:
http://www.ranorex.com/support/user-guide-20.html

Kind regards,
Tobias
Support Team