citrus
citrus copied to clipboard
Build variable name from variables
Citrus Version 3.4.0
Question Is it possible in XML-written tests to build variable names from the values of other variables? Supposed, I have an iteration, I want to use the index variable in the name of my variable to access:
<variables>
<variable name="Test1" value="the value1"/>
<variable name="Test2" value="the value2"/>
<variable name="Test3" value="the value3"/>
</variables>
<actions>
<iterate index="k" condition="k lt= 3">
<echo><message>Print ${Test${k}}</message></echo>
</iterate>
</actions>
This is supposed to echo
Print the value1
Print the value2
Print the value3
Is this possible at all?
Thanks : )