Reading files from ProjectFolder Path in testcomplete
Hi All ,
I have a file at this path in Project Itself "C:\Users\vinodkumar.chaudhary\Documents\TestComplete 10 Projects\CommonFiles".
CommonFiles is the folder created to keep all the common files. If i have to read a common file like 'common.js' from commonfiles folder , how should i do it using eval(Include...). I dont want to give complete path. For ex like below
eval(Include("../../../CommonFiles/common.js"));
function Include()
{
Code to read file
}
Hi.
The folder you're trying to reach can be addressed as ..\..\CommonFiles\
Following is how your example should look like:
eval(Include("..\\..\\CommonFiles\\common.js"));
Don't forget that double backslashes instead of single ones are needed only in contsants (direct assignments) and not needed if passed as KDT parameters or project or suite variables.
Regards,
Andrey