Gordian
10 years agoOccasional Contributor
How to tell if a project has a name map programmatically
TestComplete 10.6, JScript, Java app in a browser I have a script extension for some general purpose operations (JScript). In this code I want to programmatically determine if the current Pro...
- 10 years ago
In script extensions, you can check the presence of NameMapping like this:
var nmExists = false; try { nmExists = NameMapping.ConfigurationCount > 0; } catch (e) {} if (nmExists) { // The current project has a name map }
In regular test scripts, you can use this:
if (typeof NameMapping !=== "undefined") { // The current project has a name map } else { // The project doesn't have a name map }