Solved
Forum Discussion
Lucian
Community Hero
testRunner.testCase.setPropertyValue("nameForYourTestCaseProperty", a)
That's all. The above method should add the property to your test case if the property doesn't already exist.
That's all. The above method should add the property to your test case if the property doesn't already exist.
SriniMarva27
6 years agoOccasional Contributor
Hi Lucian,
Thanks for your reply. I want to add a property name (key) using a variable value and not the property value. How do I do that?
- Lucian6 years agoCommunity Hero
It is equally simple:
def a = "Property1" testRunner.testCase.setPropertyValue(a, "")
- SriniMarva276 years agoOccasional Contributor
Hi Lucian,
How do I add a property named Property1 at test case level using the variable 'a' reference?
- Lucian6 years agoCommunity HeroThe code from my previous answer should work well.
Related Content
- 2 years agoLRuoc