Forum Discussion
Check out https://support.smartbear.com/testcomplete/docs/scripting/specifics/jscript.html#no-circular-references-allowed-between-units. Quote:
"In TestComplete script units can refer to each other, so you can call routines and variables defined in other units. But JScript, C#Script and C++Script do not support circular references between units."
What you described in your OP is exactly that... a circular reference. This is not allowed in JScript. If you are using TestComplete 12, you can easily convert your project to JavaScript which does not have that limitation.
If you cannot convert, the best workaround is to move any common functions that both script files need into a common library, a Script3 if you would. Then call the functions you need in Script1 and Script2. This eliminates the circular reference.
Thank you Robert for your reply. That is quite helpful information. I did not know the difference between JScript and Java Script files earlier; after reading your reply I just started looking into it now. In fact, I earlier thought that I was working with Java Script files.
I used the workaround that you mentioned that it is working for me.
-Sameer