Smart Assertion: Equals (One of)
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 EXT or BHU which are the first and the last elements of the array, it says it does not match.
I can't write the values with commas and without brackets, sice I'm extracting data via property transfer and it returns an array.
Solved! Go to Solution.
Would it be possible to show the screen short of Smart Assertion?
Have you tried with Exists in Condition field?
I am assuming that the tool still considers your input to Valid Value as String, but not an array.
Just looking at the documentation
Do you want to try by removing square brackets?
Without brackets it works, but the problem is, that I extract the values and pass the variables automatically. I don't want to remove it manuelly coz it's has to be automated test.
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"]
If your source is a string containing brackets, you can use the replaceAll method:
stringList = "[D,E,F]"