jpatterson
6 years agoNew Contributor
What is the best practice for project wide counter in TestComplete?
Hello,
I am fairly new to TestComplete and am looking for ways to impliment a project wide counter using JavaScript. I can think of two ways in which the variable will not lose scope: Global Variables and nested scripts. Neither of these options look very efficent (Global Variables don't have a defined "set" method for modifing their values other then $set that I can find in the documentaion). Is there another/better way that I have not run across?
Thanks in advance,
Josh
You could also use the mechanic in JavaScript of module.export and requires to add variables and objects to other code units.