Repository & validation variables

Best practices, code snippets for common functionality, examples, and guidelines.
HansSchl
Posts: 143
Joined: Wed Sep 19, 2018 10:05 am

Repository & validation variables

Post by HansSchl » Mon Aug 24, 2020 5:17 pm

Hi,
is it possible to use a validation variable to identify a repository item? For example, my AUT creates a database entry with unpredictable name, and I want to click that entry. I have means to look up the name and save it into a validation variable, but once it's there, how do I use it in the repository item? As far as I understand, a RanorexPath like

Code: Select all

cell[@value=$name]
requires that $name be a repository variable. Is it possible to bind both types of variables to the same parameter, so that the dynamically created value of the validation variable changes the UI element which the repository item refers to? Any other (better) suggestions?

Thank you
Hans

User avatar
Stub
Posts: 515
Joined: Fri Jul 15, 2016 1:35 pm

Re: Repository & validation variables

Post by Stub » Tue Aug 25, 2020 7:00 am

When I use data-driven repo items in my code modules I just set the repository variable before using the repo item that refers to that variable.

Code: Select all

repo.name = "unpredictable name";

HansSchl
Posts: 143
Joined: Wed Sep 19, 2018 10:05 am

Re: Repository & validation variables

Post by HansSchl » Thu Aug 27, 2020 9:45 am

Just a short follow-up to let you know that I solved the problem, using a parameter that is bound to the variable.