How do you setup your Ranorex Repositories?

Best practices, code snippets for common functionality, examples, and guidelines.
gilbar16
Posts: 109
Joined: Wed Mar 26, 2014 6:23 pm

How do you setup your Ranorex Repositories?

Post by gilbar16 » Tue Oct 13, 2015 8:58 pm

In your experience working with Ranorex, what works best for you in setting up the Repositories?
In a mobile web application, Ranorex starts the Repository with Browser object followed by Dom.
Other objects added via Recording from different pages are kind of mixed either in the Dom folder or some other folders.

Do you create a separate folder for each page in the AUT and add all objects belonging to each page?

Any suggestions?

Thanks.
Gilbert

User avatar
odklizec
Ranorex Guru
Ranorex Guru
Posts: 7470
Joined: Mon Aug 13, 2012 9:54 am
Location: Zilina, Slovakia

Re: How do you setup your Ranorex Repositories?

Post by odklizec » Wed Oct 14, 2015 7:56 am

Hi,

I'm personally using a mix of rooted and simple folders, where rooted folders are used for "main" pages and if any of the "main" pages redirects to a sub-page, elements of such sub-page are stored in Simple folder.

The only reason of using simple folders is that I wanted to reduce the effective timeout, without the need to manually change the search timeout for each added rooted folder. Maybe it's not the best reason of using simple folders, but it suits me ;)

If there are elements, which are common both to main and sub-pages, I'm adding them at the end of rooted folder.

Here is a basic structure I'm using...
RepoStructure.png
You do not have the required permissions to view the files attached to this post.
Pavel Kudrys
Ranorex explorer at Descartes Systems

Please add these details to your questions:
  • Ranorex Snapshot. Learn how to create one >here<
  • Ranorex xPath of problematic element(s)
  • Ranorex version
  • OS version
  • HW configuration

gilbar16
Posts: 109
Joined: Wed Mar 26, 2014 6:23 pm

Re: How do you setup your Ranorex Repositories?

Post by gilbar16 » Wed Oct 14, 2015 5:38 pm

Hi Pavel,

Thank you so much for the example you have provided.
It really make sense to organize the objects in the Repositories as you illustrated.
You mentioned about putting elements, common to both main and sub-pages, at the end of the rooted folder.

If there are elements common to a few main or rooted folders, are you putting them at the end of the DOM element/object/folder or do you create a separate folder called "Common", for example?

Example:
o Page1 has
- FindMember_Lnk
- FindProvider_Lnk
- FindFacility_Lnk

o Page2 has
- FindMember_Lnk
- FindProvider_Lnk
- FindFacility_Lnk

o Page3 has
- FindMember_Lnk
- FindProvider_Lnk
- FindFacility_Lnk

Sample structures:
#1
o DOM
o Page1
o Page2
o Page3
- FindMember_Lnk
- FindProvider_Lnk
- FindFacility_Lnk


#2
o DOM
o Page1
o Page2
o Page3
o Common
- FindMember_Lnk
- FindProvider_Lnk
- FindFacility_Lnk


Thanks again for your input.

Gilbert

jma
Posts: 107
Joined: Fri Jul 03, 2015 9:18 am

Re: How do you setup your Ranorex Repositories?

Post by jma » Mon Oct 19, 2015 7:56 am

Hi Gilbert,

How you structure the repository depends on your specific needs.

In this case, I would prefer creating an additional simple folder (e.g. 'Common') to group the items.
This makes the structure more clearly and could especially be helpful if different users are working on the same solution.