Forum Discussion
shankar_r
7 years agoCommunity Hero
Hi,
I know we have option to create Keyword test variables at runtime. refer here
But I'm not sure how we can use keyword test name in dynamic way.
- RajeshVV7 years agoContributor
When we have more control over the Keyword Test variables we may reduce the usage of variables prior to running the test.
- shankar_r7 years agoCommunity Hero
As a workaround you can do like below,
Keywordtests.<generic_keyword_test_name>.variables.<variable_name> = "local_variable_value" To handle this, var str_keywordtestname = "KeywordTest1"; var objKeyword = eval("Keywordtests." + str_keywordtestname); Now you will have you keyword test object then you use this object to create dynamic variable. objKeyword.variable.VariableByName("MsgVar");
I haven't worked in Keyword test but I'm guess this will have some help for you to handle dynamic
- Marsha_R7 years agoChampion Level 3
Can I ask why you don't want to just define the local variables in the keyword test itself?