Ability to reuse the script variables in keywords
Previously we were writing the code in script files and we had a lot of global variables in each scrip with object xpaths and we were able to use them across scripts very easily.
Now we have changed our approach to "Keyword driven" but there is no way in Testcomplete to reuse the global variables from scripts in keywords.
Currently we came up with the appraoch where we did all USEUNITS in a script file and wrote a function GetScriptVariable(),which returns the variable value by evaluating it:
function GetScriptVariable(scriptFileName, variableName )
{
return eval(scriptFileName+"."+variableName);
}
Now we are thinking of dissolving this script file and it makes no logic to keep it only to support this one function.
There should be some way in keywords tests to reuse script variables.