alinabond
2 years agoOccasional Contributor
Smart Assertion: Equals (One of)
Hello, wenn I want to use an array in the smartAssertion which I have extracted with the Property transfer, it does not recognize an array. E.g. I pass [EXT, GTF, SHZ, BHU] as an array and if I get...
- 2 years ago
if I understand correctly, you need to transform the list (or a string containing brackets) into a string of comma-separated values.
If your source is an array, you can do a transformation with the join method:
list = ["A", "B", "C"]
log.info(list)
log.info(list.join(","))If your source is a string containing brackets, you can use the replaceAll method:
stringList = "[D,E,F]"
log.info(stringList)
log.info(stringList.replaceAll(/\[|\]/, ""))