How to find the instance of QTEXECUTIONENGINELib.IQTASUnitExecutionEngineItem
I am trying to build up a external UFT scripting framework library by C# in dll. The purpose is trying to load automation testing resources during the run-time.
I have successfully pass some UFT reserved object(objectrepositoriescollection, reporter, environment, sapguiutil, ect.) to the dll via DotnetFactory and convert to certain COM objects. For example, I can associate OR in dll like this, and it works:
public void AddRepository(string repositoryPath)
But I am still trying to load function library (vbs, qfl) by dll.
The original function in UFT is LoadFunctionLibrary "lib path". And I found this method belongs to QTEXECUTIONENGINELib.IQTASUnitExecutionEngineItem in QTExecutionEngine.dll under UFT bin folder. I can add this dll to the reference list of my c# project. But obviously, It is not working if I try to create the instance of this interface. I think the instance object is in UFT, how can I find the object instance name and pass it to dll?
Like you can pass an COM object to your C# dll, you can also pass VBScript class to your DLL. Hence you can encapsulate LoadFunctionLIbrary in a class method and then pass the object of the class to the DLL
Hi. Were you able to make this work? I have to load function libraries either through the loadfunctionlibrary, execute, executeglobal, executefile command.
I created an obfuscation solution using vb.net dll. I am calling this through dotnetfactory and I am returning the deobfuscated string and doing execute. But but by doing this method, I am exposing the deobfuscated string in qtp.
Is it possible to do an execute like method inside a dll?