Forum Discussion

mithun_js's avatar
mithun_js
New Contributor
11 years ago
Solved

Adding scripts from different project to another thru jscript code.

Hi anyone out there,



I might want to know if there is any provision for us to add scripts from different project to another thru jscript code. I know that this could easily be done in QTP thru code, but im not sure about the TestComplete. 



Any help would be appreciated.



Thanks, Mithun

  • Hi Mithun,


     


    You can use the method listed in the "Calling Routines Declared in Another Project" article to add the script file from another project to your current project. This will allow you to call script routines.


     


    I think another approach will be interesting for you as well. TestComplete provides functions to build your own script extension. You can use this extension as a storage for scripts. The only thing you need to do is to add the script extension to TestComplete's list of extensions. After that, you can call routines declared in this extension from other TestComplete projects. Refer to the "Script Extensions" article for details.


     

4 Replies

  • TanyaYatskovska's avatar
    TanyaYatskovska
    SmartBear Alumni (Retired)

    Hi Mithun,


     


    You can use the method listed in the "Calling Routines Declared in Another Project" article to add the script file from another project to your current project. This will allow you to call script routines.


     


    I think another approach will be interesting for you as well. TestComplete provides functions to build your own script extension. You can use this extension as a storage for scripts. The only thing you need to do is to add the script extension to TestComplete's list of extensions. After that, you can call routines declared in this extension from other TestComplete projects. Refer to the "Script Extensions" article for details.


     

  • Hello



    I am very intersted in the use of script extension for script storage. But I cannot find any clear way on how to do it practically. Can you please give me some hint ?



    Thanks a lot