AndrewCast
7 years agoContributor
What are the TestComplete variables?
Hi everyone!
Let's say we have this:
Sys.Desktop.KeyDown(0x0D)
What would "Desktop" be in this case? What if I want to run it such as:
variable = 'Desktop' Sys.variable.Ke...
- 7 years ago
Hi,
> What would "Desktop" be in this case?
Desktop in this case is an object provided by TestComplete. See documentation for more details on it.
> To change quickly.
i don't know exact syntax for Python, but all scripting languages have eval()/evaluate() function (or a kind) that accepts a string that must conform to the given script language requirements, evaluates it as a code and returns a result.
So, say, for JScript the code will be like this:
var variable = 'Desktop';
var cmd = 'Sys.' + variable + '.KeyDown(0x0D)';
evaluate(cmd);