Forum Discussion
Convert the array to string since testCase properties can only save strings, you can reconvert it to array when you wish to reuse it.
Thanks
Thanks for your response - however can you please provide a specific example of how to do this?
I have a REST service with a JSON payload. Whenever I refer to the Property, it formats its as a String rather than an Array.
i.e. I need this: modelOptions: ["A3", "B2", "C5"]
but what I always get is this modelOptions: "["A3", "B2", "C5"]"
...which is invalid JSON syntax.
I have also tried returning the "result" of the Groovy script directly rather than using a Property. I return an array, however, this is still converted to a String as above.
So, can you please provide some specific step by step approach to set a JSON array programatically (based on Excel data or any data source). Asserting that something can be done is not sufficient for someone asking how it can be done.
Thanks.
Related Content
- 5 years agoRama16
- 2 years agojerry91
- 8 months agoHenrikHL
- 5 years agoradekoziol
- 11 years agojose_pita
Recent Discussions
- 22 hours agodipsthorat
- 2 days agoisbiat
- 3 days agoarmygrad