carl_nagle
11 years agoNew Contributor
TC/TE VBScript Runtime Version information
Any info on the following scenario would be appreciated.
We need our VBScript libraries to be able to know and route according to the version of TestComplete or TestExecute running. Are there VBScript APIs that can provide that information?
For example, in certain libraries we will need to branch based on:
Is it TestComplete that is running? Or is it TestExecute?
Is it version 9.3? Or is it version 10?
Is it possible to get this information through an existing API or COM interface at runtime?
Any help will be appreciated.
Carl Nagle
SAS Research and Development
Planning, Operations and Strategy
General Applications and Tools
We need our VBScript libraries to be able to know and route according to the version of TestComplete or TestExecute running. Are there VBScript APIs that can provide that information?
For example, in certain libraries we will need to branch based on:
Is it TestComplete that is running? Or is it TestExecute?
Is it version 9.3? Or is it version 10?
Is it possible to get this information through an existing API or COM interface at runtime?
Any help will be appreciated.
Carl Nagle
SAS Research and Development
Planning, Operations and Strategy
General Applications and Tools
- Hi Carl,
What about this code snippet (untested, off top of my head):
Set p = Sys.WaitProcess("TestComplete", 500)
If (p.Exists) Then _
Call Log.Message("TC detected")
Set p = Sys.WaitProcess("TestExecute", 500)
If (p.Exists) Then _
Call Log.Message("TE detected")
If (Not p.Exists) Then _
Call Log.Warning("Neither TC nor TE was detected")
iVerMajor = aqConvert.VarToInt(p.FileVersionInfo.MajorPart)
Call Log.Message(aqString.Format("Major version # is: %i", iVerMajor))