how to include external file in test complete project suite
Hi,
I am using eval method to include an external file in my project which reads the file from my desktop.
Is it possible to read the same file from project location path.
If something like below is possible then it would be of great help.
Dir/CommonSource
Dir/Project1
Dir/Project2
In
Dir/CommonSource i can keep my all common files , and then i can use it with all my projects.below is the sample code that i am using.but this is not fullfilling my requirement as we want to have project directory stuc like i said above - Dir/... , Dir/... etc
eval(Include("Global-Constants.js"));
function Include()
{
var myDocuments = 5;
var objShell = new ActiveXObject("shell.application");
var objFolder = objShell.NameSpace(myDocuments).self.path;
var fileName = objFolder+"\\TestComplete 10 Projects\\CommonFiles\\"+ arguments[0];
var fSO = new ActiveXObject("Scripting.FileSystemObject");
var readFile = fSO.OpenTextFile(fileName, 1);
var str = readFile.ReadAll();
return str;
} // End Include()
Thanks
Vinod