Forum Discussion

ChrisScharer141's avatar
13 years ago

Adding Linked Libraries At Run Time

I know that you can link a library to a project in Test Complete (TC), but I'm wondering if you can load a library and unload a library at run time within a script similar to the ExecuteFile command in Quick Test Pro (QTP)?  The reason I ask is that they implimented this functionality in their tool after I recommended it in a Rounde Table event at the HP Software Universe (now known as HP Discover) back in 2008.  This allows me to only load functions that I need at run time so I can reduce the amount of memory that my testing is using.  It also reduces the effort of TC when I am working on a test and also reduces the potential for someone to accidentaly modify and save a library which could have a very negative impact depending on how well you perform versioning.

  • Hi Christopher,


     


    To run external script files (*.js, *.vbs), you can use the following function:


    //JScript


    function ExecuteFile(path)


    {


      var ws = Sys.OleObject("WScript.Shell");


      ws.Run(path);


    }

  • Tanya,





    I have used your code to load the library file in runtime, But In QTP I was able to see the loaded Library . Could you please let me know where can i find the loaded Library in Testcomplete 7.52 ?





    Regards,

    Abdul