Forum Discussion

shankar_kalel's avatar
12 years ago

Accessing Addin objects of .NET Applications using Sys.Process("MyApp").AppDomain("MyApp.exe").dotNET

We are using Test Complete 9 for automated testing of a Third Party Dotnet application say MyApp.exe.

The MyApp also has support for writing custom addin. So we have created our addin as MyAppAddin.dll which can be loaded in MyApp.


Now we want to use application objects inside MyApp as well as MyAppAddin via app domain based access mechanism.


The interesting siutation is that we can successfully access dotNet objects for MyApp


Sys.Process("MyApp").AppDomain("MyApp.exe").dotNET.MyApp_namespace.MyApp_class_name



...but can not access dotNet objects of MyAppAddin using same mechanism.



Sys.Process("MyApp").AppDomain("MyApp.exe").dotNET.MyApp_Addin_namespace.MyApp_Addin_class_name


Note that MyAppAddin is loaded in the Same App Domain as MyApp.Exe.

So the question is for addin developer, what is required to make a addin dll exposed to test complete with above App Domain mechanism.


The point is that I also checked using mdbg.exe (http://msdn.microsoft.com/en-us/library/ms229861(v=vs.110).aspx), how many assemblies are loaded in AppDomain MyApp.exe and it shows MyAppAddin.dll. So it seems that MyAppAddin.dll is really loaded in AppDomain MyApp.exe but then why it's objects are not accessible to TestComplete scripts via Sys.Process("MyApp").AppDomain("MyApp.exe").dotNET.MyApp_Addin_namespace.MyApp_Addin_class_name?
No RepliesBe the first to reply