Forum Discussion

asadc's avatar
asadc
New Contributor
5 years ago
Solved

.NET Connected.TestedApps["Items"]("appName") execute well in TC IDE, but giving null exception in C

This code execute successfully in TC-IDE function Test1() { var appName = "TestApp"; var appObj = TestedApps["Items"](appName); if (appObj != null) {     Log["Message"](appObj["ItemName"]);  ...
  • AlexKaras's avatar
    AlexKaras
    5 years ago

    Hi,

     

    Well, I don't know all your details, but my personal opinion is "Why not to provide a client with TestComplete project that already does what is needed?".

    While providing TestComplete project to the client you may warn them that if they change something in test code this will be on their own and you will not support this. What you will support is their change requests in response to which they will get updated TestComplete project.

    Or your expectation was not to support provided .dll?

     

    What you are trying to implement sounds to me like connected self-testing application where TestComplete is supposed to act as this self-testing application. Not sure to what extent this is supported in TestComplete.

    Slightly different approach that you may consider: when your test code is running, it may call Sys.OleObject("TestComplete.Application") and get an access to the COM object of the current TestComplete instance. This COM object provides some child objects like Integration and others (if I remember their names correctly) that can be used from test code.

    The problem is that these child objects are not well documented and it will not be easy to figure out how this or that can be done. If ever can.

    I would recommend to ask Support for their comments directly via the https://support.smartbear.com/message/?prod=TestComplete form and reference this thread.