Forum Discussion

kipaby's avatar
kipaby
New Contributor
2 years ago

Object recognition not working when using self-contained

Hello.

 

We're currently testing a product with TestComplete that used to be developed with .net 4.8. It's a WPF application. Now they switched to .net 7 and are also using the option self-contained, so the .net 7 framework doesn't need to be distributed. The builds that have this self-contained option have the problem that we can't use TestComplete with them as the object recognition does not work. The TestComplete spy just recognizes the "main" window and no objects (button, fields) within.

 

Does someone here know if there is a way to use this self-contained option and still make TestComplete work with it?

  • kipaby's avatar
    kipaby
    New Contributor

    As in the documentation, .net 7 does not seem to be supported, but we had the same issues for .net 6 as well, which is supported.

    But both usually work well with TestComplete. Only when using the self-contained option while building it sadly doesn't anymore.

    For test purposes I just used the star (all) in Project properties > Open applications > MSAA and also tried the same with UIAutomation. Both works, though in both the treatment of objects is totally different than normal. We would have to build our namemapping from scratch using those methods, but I'm grateful there is at least some kind of worst case workaround.

     

    Maybe the TestComplete spy/object recognition does need some kind of DLL to work correctly? I am very appreciative of any ideas to bring this further.

     

     

     

     

    • AlexKaras's avatar
      AlexKaras
      Champion Level 3

      Hi,

       

      if there is a way to use this self-contained option and still make TestComplete work with it?

      I would suggest to also ask Support directly about this via the https://support.smartbear.com/testcomplete/message/ form.

      I also would appreciate it if you update this thread with Support's answer.