Forum Discussion

quessev's avatar
quessev
Occasional Contributor
11 years ago

Problems with TC 9.20 on Windows8

I encounter some problems with one project running on Windows 8. My configuration is the following: TC 9.20.2460.7, Windows 8 Home Premium 32 bits (6.2 Build 9200), VMware Workstation 8.0.4 build-744019. That project involves actions from the Windows Explorer. From what I have seen:



  1. File listitems no longer exist when they are not visible.


  2. Some listitem can exist and can be flagged as visible even when the associated file is not displayed in the folder view on screen. (snapshot 1& 2)


  3. The values in the VScroll object part of the list are always set  to 0. It seems there is no mean to get information about the scroll vertical position.




Due to points 1 and 3 code like the following doesn't work any more:



    while not folder.List('Vue d elements').ListItem(fname).Visible

      and (folder.VScroll.Pos <> folder.VScroll.Max) do

    begin

      folder.Keys('[PageDown]');

      folder.Refresh;

    end;    



I have found a workaround but it is much more complex.



Concerning point 2 I am unable to solve the following problem:



  • I am trying to use the popup menu associated to a file item: I call ClickR on the listitem and then use Popupmenu on the folder object.


  • When the listitem is flagged as Visible but doesn't appear on screen, calling Click seems to scroll the folder window by one line (I have set option Use Test Visualizer during test run, and according to the recorded image folder window has been scrolled).


  • When I try to use Popupmenu I get the following error mesage  'Cannot obtain the popup menu.' (snapshot n°3)


7 Replies

  • quessev's avatar
    quessev
    Occasional Contributor
    I have installed TC 9.30 and my problems are not solved. On the attached copy one can see that:


    • files file_04.txt and file_20.log are not dislayed in the explorer window but they exist in the TestComplete Object Browser tree


    • item file_20.log is flagged not visible


    • item file_04.txt is flagged visible


    Does anyone have an idea about a workaround we could use in such situations? The goal is to display the popmenu associated with the file.
  • TanyaYatskovska's avatar
    TanyaYatskovska
    SmartBear Alumni (Retired)

    Hi Pascal,


     


    Is the file_04.txt file hidden? Actually, you can use the VisibleOnScreen property of a ListItem object to check whether the object is visible on the window. For the file_04.txt file, VisibleOnScreen = False.


     

  • quessev's avatar
    quessev
    Occasional Contributor
    Unfortunately VisibleOnScreen is set to false for all the listiitems.



    I think I found a way to solve my problem.



    The problem only occurs when windows explorer is configured to show file details. In that case the explorer window contains a header displayed at the top of the file list showing file attributes: Name, Size, ... The first item is displayed under that header. When looking object properties with Object browser Top property of the first element is set to 36. But this works only on the first page. When you hit PageDown twice to display netr page Top property of the first list element is set to 5. That item is flagged Visible but you cannot see it because it is hidden by the header.



    The header is in a List object and it is called 'En-tête' on my french system. I suppose it is called 'Header' on an english one. So I have to check the existence of that object and get its height. When a list item has a Top property less than header height  item is not visible.



    It seems to work fine.
  • quessev's avatar
    quessev
    Occasional Contributor
    The lack of consistency between objects displayed on the screen and property Visible affects the first item and sometimes the last item. I have encountered situations where:


    • List Height is 643


    • Last element Top is 641


    • Last element is not displayed on screen


    It seems to me there is a mess due to the difference between Height property of listitem and Height property of the header. That value is 25 and the listitem Height is 22.



    I have added a test on Top property against min and max value to ensure listitem is visible on screen. Now I can move to the file in the explorer window regardless the kind of display.



    Unfortunately occosionally I continue to get errors when I try to access PopupMenu.
  • quessev's avatar
    quessev
    Occasional Contributor
    I installed TC 9.30 on Windows 7 and I get the same problems.



    There mus have been a change in TC regarding management of list elements in windows explorer. I upgraded from 8.60 to 9.20 so I can not tell in which version it occured.



    Does anybody know if that change is documented somewhere?



    TIA.

  • TanyaYatskovska's avatar
    TanyaYatskovska
    SmartBear Alumni (Retired)

    Hi Pascal,


     


    As you are using MSAA to see the list of files, I cannot tell you for sure whether TestComplete works incorrectly. It only activates using the MSAA technology for this window. Anyway, I suggest that you investigate this behavior with our R&D team. Please contact the TestComplete Support team and describe the current situation.


     


    Besides, TestComplete provides special methods to work with Open/Save dialogs. See the "Working With Open File and Save File Dialogs" article to learn more about them.