Change variable value in run time

Ask general questions here.
bk_tester
Posts: 26
Joined: Thu Dec 29, 2016 5:37 pm

Change variable value in run time

Post by bk_tester » Thu Dec 29, 2016 6:23 pm

Hello Support Team,

I'm widely using Repository variable to optimize amount of Repository elements. In particular to identify TreeItems by TreeItem Text value, for example. In most cases it works fine, especially when I need to select/click on only one TreeItem within one Recording module. Here is xPath for that TreeItem:
.//tree[@visible='true']//treeitem[@text=$TreeItemText ]
Now I have test case when I need to select several items in the Tree within one test case step. I think about replacing $TreeItemText value and after that selecting required items. I thought about Code Module for setting value to the $TreeItemText variable, but maybe there are another ways to do that?

Thanks

tvu
Posts: 195
Joined: Tue Apr 07, 2015 10:47 pm

Re: Change variable value in run time

Post by tvu » Fri Dec 30, 2016 11:52 pm

Why don't you just call the recording multiple times and bind each instance of the variable to different values?

bk_tester
Posts: 26
Joined: Thu Dec 29, 2016 5:37 pm

Re: Change variable value in run time

Post by bk_tester » Wed Jan 04, 2017 4:30 pm

Hm... thanks for that hint! :)