Add to / Update Repository

Ask general questions here.
mfisher1
Posts: 1
Joined: Fri Apr 01, 2011 3:27 pm

Add to / Update Repository

Post by mfisher1 » Fri Apr 01, 2011 3:38 pm

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!

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

Re: Add to / Update Repository

Post by Support Team » Mon Apr 04, 2011 10:56 am

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