Please point out the advantages and drawbacks of each methods.
thanks in advance
Starting with your last question first.
However... neither one is listed as "preferred". There are limitations and things that are different, all documented at https://support.smartbear.com/testcomplete/docs/scripting/calling-routines/declared-in-another-unit/...
[Hall of Fame]
Please consider giving a Kudo if I write good stuff
Why automate? I do automated testing because there's only so much a human being can do and remain healthy. Sleep is a requirement. So, while people sleep, automation that I create does what I've described above in order to make sure that nothing gets past the final defense of the testing group.
I love good food, good books, good friends, and good fun.
Mysterious Gremlin Master
Vegas Thrill Rider
I would personally use the modules.exports, it allows for better control of what functions other script units have access too.
Click the Accept as Solution button if my answer has helped