Records or other structures in delphi scripts
My colleague asked a tricky question. How to internally store/pass record like structures between delphi script routines.
Records are not supported. So is there any way to use json objects in delphi scripts?
Or any other trick?
Solved! Go to Solution.
That's a GOOD question.
I would have suggested that you use the ODT object structures available in TestComplete to create custom classes and objects. That is what I've done in the past with good success. They are deprecating that feature some day (but not yet since there are a lot of people still using it) so I wouldn't recommend going that way.
An alternative (and this is just a mental thought) is to create some sort of generic code in a JScript script extension where you can create an object and add properties to it. That MIGHT work... I've played around with the idea to some success. That way you would call some routine from the extension to create an object with a set of properties (say, pass in an array) and the extension code would return an instance of that object for you to use.
[Hall of Fame]
Please consider giving a Kudo if I write good stuff
Why automate? I do automated testing because there's only so much a human being can do and remain healthy. Sleep is a requirement. So, while people sleep, automation that I create does what I've described above in order to make sure that nothing gets past the final defense of the testing group.
I love good food, good books, good friends, and good fun.
Mysterious Gremlin Master
Vegas Thrill Rider
How about using Dictionary objects? A dictionary contains key=value pairs, which is similar to an object with named properties.
SmartBear Documentation Team Lead
Did my reply answer your question? Give Kudos or Accept it as a Solution to help others. ⬇️⬇️⬇️