Sachin_Sawe
17 years agoContributor
Dynamically creating property key?
Ole,
I have a Properties step with bunch of properties for e.g.
1=Excellent
2=Good
3=Ok
Now I know I can retrieve these using context.expand( 'Properties#1' )
However, I want to make "1" dynamic. For example I do not know what to substitute after # sign only up until I reach that point of execution so in other words I want to have a variable that will take any number and that will be substituted after 'Properties#' above. I am not able to do this. I tried doing 'Properties#${variable}' but that does not work
Also since I want to do this in assertion step, I am not able to access testRunner either, otherwise I would have done something like
testRunner.testCase.tesSteps['Properties'].getPropertyValue(variable)
Please help.
Thanks,
Sachin
I have a Properties step with bunch of properties for e.g.
1=Excellent
2=Good
3=Ok
Now I know I can retrieve these using context.expand( 'Properties#1' )
However, I want to make "1" dynamic. For example I do not know what to substitute after # sign only up until I reach that point of execution so in other words I want to have a variable that will take any number and that will be substituted after 'Properties#' above. I am not able to do this. I tried doing 'Properties#${variable}' but that does not work
Also since I want to do this in assertion step, I am not able to access testRunner either, otherwise I would have done something like
testRunner.testCase.tesSteps['Properties'].getPropertyValue(variable)
Please help.
Thanks,
Sachin