testingautomated-teststestcomplete

Descriptive programming in testcomplete


Is there any way to do descriptive programming in testcomplete? In my current project I use NameMapping, But I want to switch to descriptive programming so that I can move object definitions from NameMapping to an external file.


Solution

  • Since TestComplete does not provide such built-in functionality, you need to implement it yourself. Create a script function (you can create a script extension for this) that will return an object by your custom name. This function will read the content of the external file with object definitions, search for the needed object within the object tree and return the found object.