Recorder generated XML repository for C# code

Class library usage, coding and language questions.
vnet
Posts: 29
Joined: Tue Jul 24, 2012 8:13 pm

Recorder generated XML repository for C# code

Post by vnet » Fri Sep 07, 2012 7:55 pm

How can I use the repository generated with recording in my C# code (using ranorex APIs)?I want the repository in the xml format.

User avatar
Support Team
Site Admin
Site Admin
Posts: 11709
Joined: Fri Jul 07, 2006 4:30 pm
Location: Graz, Austria

Re: Recorder generated XML repository for C# code

Post by Support Team » Mon Sep 10, 2012 4:49 pm

Hi,

I am sorry but I am not sure what you are trying to do, maybe you can explain more detailed what you want to do? In gereral you just have to create an instance of the repository in order to access the items in there:
public static YourRepository repo = YourRepository.Instance;
Regards,
Markus
Ranorex Support Team
.
Image

vnet
Posts: 29
Joined: Tue Jul 24, 2012 8:13 pm

Re: Recorder generated XML repository for C# code

Post by vnet » Fri Sep 14, 2012 8:36 pm

I actually opened my ranorex recorded solution in VS and that converted my repository to XML along with cs. On trying to add the existing repository to my solution, was only getting cs code, hence the question. I was kinda confuse.

User avatar
artur_gadomski
Posts: 207
Joined: Mon Jul 19, 2010 6:55 am
Location: Copenhagen, Denmark
Contact:

Re: Recorder generated XML repository for C# code

Post by artur_gadomski » Mon Sep 17, 2012 7:36 am

Repository files (rxrep) are basically an xml file. Youc an add them to your VS solution for convenience and change the default programm to open them with to Ranorex Spy. (Right click in VS on your repository choose Open With, select Ranorex Spy and click Set as Default). To work with repositories in code you need to generate C# code from repository. (in Spy: Export and then Genrate C# code.)