Forum Discussion

vdovin_sy's avatar
vdovin_sy
New Contributor
11 years ago

Objects was not found - SysTreeView32 in Windows 8


The test has been written in TestComplete 10.0.531.7 (under Windows XP) and executes without errors.


In TestExecute 10.0.531.11 (under Windows 8) it fails with the following error:


 


An error occurred while accessing the "ClickItem" method or property of the "SysTreeView32" object.


The object or one of its parent objects was not found.


 


Object Whose Method or Property Was Accessed


Alias: Aliases.SLV_sql.dlg_4.SHBrowseForFolderShellNameSpaceControl.SysTreeView32 


Name mapping item: NameMapping.Sys.SLV_sql.dlg_4.SHBrowseForFolderShellNameSpaceControl.SysTreeView32 


 


Object That Was Not Found


Alias: Aliases.SLV_sql.dlg_4.SHBrowseForFolderShellNameSpaceControl.SysTreeView32 


Name mapping item: NameMapping.Sys.SLV_sql.dlg_4.SHBrowseForFolderShellNameSpaceControl.SysTreeView32 


 


Click the link above to view and configure mapping settings for the missing object.


 


It is normal that the same message?

5 Replies

  • AlexKaras's avatar
    AlexKaras
    Champion Level 3
    Hi Sergei,



    > It is normal that the same message?

    Actually, the message is not the same but consists of two parts: the first part tells you what object or method you was trying to access and the second part tells you what object or method caused the problem. When (like in your case) both object names are the same, this means that the problem was caused by the last element (SysTreeView32 in your case).

    Most probably, you need to check what UI element is used in Win8 instead of SysTreeView one that was used in WinXP (it might be, for example, 64-bit version of the same control) and either create a separate namemapped name for it to be used for Win8, or create a separate configuration (http://support.smartbear.com/viewarticle/55105/) for Win8 if there will be too many problematic elements like this, or use a conditional namemapping (http://support.smartbear.com/viewarticle/55608/).
  • vdovin_sy's avatar
    vdovin_sy
    New Contributor
    Thank you for your answer. I'd like to clarify: how can I check it if TestComplete is not installed in Win8?
  • AlexKaras's avatar
    AlexKaras
    Champion Level 3
    Hi Sergei,



    > I'd like to clarify: how can I check it if TestComplete is not installed in Win8?

    Not sure that I got your question, but if you are asking about tests debugging, then, unfortunately, TestExecute provides no means for this.

    Your options are:

    -- Either install TestComplete on the given machine and use it (TestComplete) for tests debugging; or

    -- Implement extended logging in script code (this can be done with any editor as script units in TestComplete are plain text/unicode files) and output to the log anything that you need to understand where and why the test fails/crashes.
  • vdovin_sy's avatar
    vdovin_sy
    New Contributor


    We implemented extended logging in Delphi script code and we got different results in TC and TE.


    It is seen that TE doesn't recognize Properties and Methods of the tested object. What is wrong? 


     


    Delphi script code:


     


    procedure LoggingObjectProperties(obj: IDispatch);


    var


      props: aqObjIterator;


      prop: aqObjProperty;


    begin


      props := aqObject.GetProperties(obj);


      Log.Message('Begin Print Object (Name = ' + obj.Name + ') Properties', Sys.Desktop.ActiveWindow, pmHighest);


      while (props.HasNext) do


      begin


        prop := props.Next;


        Log.Message('            ' + prop.Name, Sys.Desktop.ActiveWindow, pmHighest);


      end;


      Log.Message('End Print Object Properties', Sys.Desktop.ActiveWindow, pmHighest);


    end;


     


    procedure LoggingObjectMethods(obj: IDispatch);


    var 


      colMethods: aqObjIterator;


      Method: aqObjMethod;


      Params: string;


      i: integer;


    begin


      colMethods := aqObject.GetMethods(obj);


      Log.Message('Begin Print Object (Name = ' + obj.Name + ') Object Methods', Sys.Desktop.ActiveWindow, pmHighest);


      while (colMethods.HasNext) do


      begin


        Method := colMethods.Next;


        Params := '';


        for i := 0 to Method.ParamCount - 1 do


          Params := Params + 'Param' + IntToStr(I) + ' - ' + Method.ParamName(I) + ', ';


        Log.Message('            ' + Method.Name + ': ' + Params, Sys.Desktop.ActiveWindow, pmHighest);


      end;


      Log.Message('End Print Object Methods', Sys.Desktop.ActiveWindow, pmHighest);


    end;


     


    Results in screenshots.

     


     




  • TanyaYatskovska's avatar
    TanyaYatskovska
    SmartBear Alumni (Retired)
    Hi Sergei,

     


    As far as I understand, the window you are having issues with is a regular Windows Open window, right? 


    There have been big changes in this dialog since Windows XP. Now, this is the DirectUIHWND dialog. I guess that TestExecute doesn't see anything located inside this dialog. That's why, you see only the Exists property of the tree. I bet its False. Check what the value of the WndClass property of this object is (I suppose this is the main dialog):


    Alias: Aliases.SLV_sql.dlg_4.SHBrowseForFolderShellNameSpaceControl


     


    If the value is DirectUIHWND, you need to modify your project in TestComplete: adding this class name under the MSAA project properties. This will allow TestComplete and TestExecute to recognize objects. However, I'm not sure whether the recognition will be similar to the one you see on Windows XP. Perhaps, you will need to modify your test a bit.


     


    BTW, you can consider using the OpenFile Method to open the needed files. Refer to the "Working With Open File and Save File Dialogs" article for details.