JohnSnikers
6 years agoOccasional Contributor
Autoincrementing project variables dinamically
Hi,
I would like to write a function in JS which automatically increments the value of the given project variable as parameter dinamically.
Something like:
function AutoIncrement(variable){...
- 6 years ago
Hi,
> Im not sure how this Project.Variables.$set function works
https://support.smartbear.com/testcomplete/docs/reference/language/javascript/set-method.html
> If possible please give me some examples
Try this:
function AutoIncrement(variable){
Project.Variables.$set("VariableByName", variable, Project.Variables.$get("VariableByName", variable) + 1);
}