Multiple value replacement for repository variable in recording module

Class library usage, coding and language questions.
yvaronin
Posts: 2
Joined: Thu Jun 18, 2020 2:02 pm

Multiple value replacement for repository variable in recording module

Post by yvaronin » Thu Jun 18, 2020 2:20 pm

Hi, I have a question:

Input data:
1. I have several repositories that contain dynamic repository items with variables

for example:it's an item for the selecting of combobox element from the available list
listElement: /dom[@caption=...]//div[@class='scrollingMenu']//table[@class='listTable']//td/div[@innertext=$dListelement]

GUI contains many comboboxes and each list element of them is easily accessible with this one path.
I have many such GUIs

2. A recording module uses own repository und has several variables (per combobox), it should use comboboxes one by one and select values from variables as list elements.

for example: I have five comboboxes and five module variables for it (dPerson, dTyp, dStatus, dUrgency, dImpact),
my top item 'listElement'shall then be used five times
Problem: How can I change the repository variable dListelement before each of five usings of the repository item?


My Idea:
This would be an User Code Collection that have a method for the assigning of repository variable with the value from another variable.
I don't want to write many local user codes in each recording module.
This method could be used in all my recordings modules and with all repositories.

Next hurdle:
But then I am here limited by the variable types, we are allowed to use the type RepoItemInfo to access to my current repository item.
Okay, it comes the next question, how do I jump from RepoItemInfo object to the variable that described in this xpath?

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

Re: Multiple value replacement for repository variable in recording module

Post by odklizec » Fri Jun 19, 2020 3:02 pm

Hi,

I’m afraid, I’m a bit lost here 😉 I think it would be much easier to understand what you actually trying to do, if you post a Ranorex snapshot (Not screenshot) of the problematic UI and sample solution describing what you currently have.
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

yvaronin
Posts: 2
Joined: Thu Jun 18, 2020 2:02 pm

Re: Multiple value replacement for repository variable in recording module

Post by yvaronin » Wed Jun 24, 2020 9:16 am

Hi, thanks for replying!

There are several examples, one of them I have snapshotted.

You can see here three comboboxes, for each one you have to select something, this comes from variables from outside (from data source).
I have only one repository item for all such comboboxes, it has its own repository variable. I need to transfer values from data source to this variable every time when I use the corresponding combo box.

I'm glad for your feedback, ready for another question. Thank you!
Attachments
example_to_scrolling_menu.rxsnp
(1.34 MiB) Downloaded 4 times

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

Re: Multiple value replacement for repository variable in recording module

Post by Support Team » Fri Jun 26, 2020 7:31 pm

Hello Yvaronin,

Looking at the snapshot and the requirements this should be possible using a data source. I would like to get a better idea of the steps you are performing in your test as I believe code is not needed. I recommend creating a support query and providing more details including your Ranorex solution so we may make accurate recommendations.

https://www.ranorex.com/support-query/

Regards,
Sean
.
Image