Ask a Question

Dynamically add TestedApps in Script Extensions

Occasional Contributor

Dynamically add TestedApps in Script Extensions


I create a Script Extensions and introduced themethod which i could add TestedApps Dynamically.

I could run successfully in debug mode but failed in Script Extensions.

I am not sure if we could add TestedApps in Script Extensions dynamically  ,Did  I miss something here?


Code like this:

function AddCharApplication(){

var AppPath = "a.exe"
var index = "";

if ( aqFile.Exists( AppPath ) ) {
var index = TestedApps.Find( AppPath );
if ( -1 == index )
index = TestedApps.Add( AppPath );
} else {
Runner.Stop( false );
Log.Error( "" );
var apprun = TestedApps.Items( index ).Run();


Error Message:



Valued Contributor

Just to clarify, your script extension, is it relating to Script Extensions Dialog ?


TestedApps is inbuilt into TC. It seems like your Script Extension can not use the inbuilt functions of TC. The coding you have written, does it really need to be an Extension?

Occasional Contributor

I have multiple projects need to run in sequence, and also need to start different clinet testapp for different project.

My first thought I wanna add the TestedApps in the script extension. then some project could start some testapp from script extension when it is executed.


if this could be implemented, i think i may not need to add the Testapp for some projects, and those project could be call the common method directly from script extension.


It seems that I'll have to go the other way.


Thanks rraghvani for your quick reply!!🙂

Valued Contributor

Script Extensions are used to create TestComplete plugins using TestComplete SDK.


From what I understand, you want to launch different applications, such as a.exe, b.exe, c.exe etc? You can define these in TestedApps, and launch them in your projects.



Occasional Contributor

Hi rraghvani,Do you know if there is any way to call the method in script in cross project in one TestSuite.




-Project A
------- Function A(){}

-Project B
------- Function B(){}

-Project C
------- Call Function A() in Project C ??


Valued Contributor

Yes you can. I had written this, on another post today:


If you find yourself starting to implement the same functions, then it's probably best to create a separate project which has all your functions, which can then be called from other projects


For example,


See Import Functions Dialog, and require("Unit1"); uses round brackets, not square!

Occasional Contributor

Yes, I think i have to create a new project to dealt with this on the recommendation of you.

Thank you very much!.


Showing results for 
Search instead for 
Did you mean: