AYedidya
11 years agoNew Contributor
[Res] Casting context.expand #result
I have script #1 (= MetaData) were I populate hash table with data and I would like to use this hash table in script #2 (= ResultData).
This hash table is the result of script #1 so I am using context.expand in script #2 (ResultData) as follows:
def metaDataHashtable = new Hashtable()
metaDataHashtable = context.expand('${MetaData#result}')
When I print the metaDataHashtable I get it correctly with all the data but I cannot access the values inside it as the context.expand returns it as a string and not as hashtable.
I also tried to pass the hashtable to a test case/project property but it also returns it as a string.
How can I pass parameters from one test step to another test step were the data type is different than String (i.e. integer, hashtable, etc.)?
This hash table is the result of script #1 so I am using context.expand in script #2 (ResultData) as follows:
def metaDataHashtable = new Hashtable()
metaDataHashtable = context.expand('${MetaData#result}')
When I print the metaDataHashtable I get it correctly with all the data but I cannot access the values inside it as the context.expand returns it as a string and not as hashtable.
I also tried to pass the hashtable to a test case/project property but it also returns it as a string.
How can I pass parameters from one test step to another test step were the data type is different than String (i.e. integer, hashtable, etc.)?