Forum Discussion

vlad230's avatar
vlad230
Contributor
14 years ago

Win 7 vs. Win XP .NET Open Applications Support (v. 8.70) compatibility issue?

Hi guys,



I'm trying to test a .NET application using the "Record Script" feature in Test Complete v. 8.70.727.7.



I'm noticing that various objects are not recognized when using Window 7 (32 bits, .NET Framework 3.5 SP1 installed) which causes the test to fail.



The test I am performing is passing flawlessly on Windows XP (.NET Framework 3.5 SP1 installed) using the same version of Test Complete, but fails under Windows 7.



I have also imported the project suite and Test Complete's settings (Tools->Settings->Import/Export Settings) from the one running on Windows XP but with no luck.



Are there any compatibility issues between Test Complete's .NET Open Applications Support (v. 8.70) and Windows 7?



Can anyone help?



Thanks.

13 Replies

  • Hi Ionut,


    It looks like the mapping criteria are still insufficient to recognize the problematic object. To understand how object are recognized, follow the steps below:


    1. Insert the following routine call in your test before retrieving the problematic object (change the process name):




    LogAppStructure(Sys.Process("MyProcessName"))


    Here is the LogAppStructure routine code:




    function LogAppStructure(obj)

    {

      var count, i, Str;

      var params = new Array();

      params.push("WndClass");

      params.push("WndCaption");

      params.push("Index");

      params.push("VisibleOnScreen");

      params.push("Exists");

      params.push("Visible");

      params.push("FullName");

      params.push("ClrFullClassName");



      Str = "";

      for (var i = 0; i < params.length; i++) {

        if (IsSupported(obj, params))

          Str += params + " = " + VarToStr(eval("obj." + params)) + "\r\n";

      }

     

      Log.AppendFolder(obj.Name, Str);

      for (var i = 0; i < obj.ChildCount; i++) {

        LogAppStructure(obj.Child(i));

      }

      Log.PopLogFolder();

    }


    2. Execute your test and reproduce the "Ambiguous recognition of the tested object" problem. The LogAppStructure function will post the entire structure of the tested application to the test log, and you will be able to see how objects are recognized right before the problem occurs.


    3. If you fail to find the cause of the problem by using the test log, zip your entire TestComplete project suite folder along with the log of the test execution and send us the archive via our Contact Support form. Make sure that messages in your log correspond to correct actions in the latest version of your test.

  • copiloo's avatar
    copiloo
    New Contributor
    Hi Margaret,

    Thank you for the solution. However I used another approach to resolve both issues,

    We can call pdfViewer's controls by the FullName property. I use wildcards were things get dynamic like:

    WinFormsObject("axAcroPDF1").Window("Static", "*", 1) instead of

    WinFormsObject("axAcroPDF1").Window("Static", "C:\\etc\\temp\\etc.pdf", 1)

    This way we don't ecounter problems like "overlapping window" or “Ambiguous object recognition”.



    How feasible do you think it is this approach, in this particular case?  



    ThankYou!
  • Hi,


    Of course, you can use this approach. I'm glad that you solved the problem.