Help:How to make Repository Item Data Driven

Best practices, code snippets for common functionality, examples, and guidelines.
Posts: 3
Joined: Sat Apr 09, 2016 2:44 am

Help:How to make Repository Item Data Driven

Post by sensay » Sat Apr 30, 2016 10:19 pm

I am trying to make the url section of a test to be data driven.

I have already done data binding to the recording module with an excel sheet and it works fine. But having hard times to data bind the repository items as a result i have to manually edit it everytime before running the test.

Can anyone tell me the ways to data bind the repository items.

I did look at the tutorial about how to make repository items data-driven. But still no luck :(

Do i need to add another excel sheet to the repository?
Please help
You do not have the required permissions to view the files attached to this post.

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

Re: Help:How to make Repository Item Data Driven

Post by odklizec » Mon May 02, 2016 8:07 am


I'm not sure what exactly is your problem? From what you posted it looks like there should be no problem with connecting variables with data connector. I don't understand what you mean by "i have to manually edit it everytime before running the test"? If the Domain string looks different from the url you want to open in browser, then you need to use two different variables (one for 'domain' attribute, and another one for URL path).

To be honest, I would strongly discourage you from variabilizing 'domain' attribute of the DOM element. The problem is, that DOM is a top level object in your repo hierarchy, which means you will have to bind the VarURL variable in every single recording module you add to your project.
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

Posts: 2683
Joined: Tue Feb 07, 2012 4:14 pm
Location: Austin, Texas, USA

Re: Help:How to make Repository Item Data Driven

Post by krstcs » Mon May 02, 2016 2:47 pm

I would argue that if you name your variables the same as the data columns in your data connectors, it doesn't matter how many modules a variable is in. Autobind will bind them correctly automatically for the whole test case at a time.

I use domain as a variable in every web-based test I make because otherwise you would have to make a new repo object for every /dom you are going to hit (in my case 5 different ones for different version staging areas), which means multiples of EVERY OBJECT UNDER THE DOM. This is not the right way to do it and it isn't maintainable. Making the domain a variable is the correct way to handle this as you only need one copy of any repo object. In addition, once the variables are mapped once, you don't have to do it again.
Shortcuts usually aren't...