Forum Discussion

dyarwood's avatar
dyarwood
Contributor
11 years ago
Solved

How to map a Status indicator icon?

Hi,



The application I'm testing has a series of grids that display data.



Sometimes when sorting or first retrieving the data in a grid there is a slight delay in getting and displaying the data. When that happens, the application puts up a status indicator/progress bar. In our case, it looks like a little wheel centered over the grid. 



This object disappears after a second (or two) once the data is retrieved.



However, one of my tests is to sort the data in the columns of the grid. TestComplete is so fast that it clicks thru the column headers before the data is retrieved in many cases.



I want to use a While loop to slow it down so that the grid results come back (and get checked) prior to TC advancing to the next column. 



What I can't figure out is how to map the object. The Object Spy and Map Object items don't 'see' the object apparently, at least not quickly enough the few times I've been able to point at it. The object goes away far too quickly for me to try and find it in the Object Browser.



Does anyone have an idea about how I can 'find' the object and map it?
  • Also, in addition to what was said by Marsha, I would try the following:

    -- Disable automatic namemapping in TestComplete (Tools|Options|Engines|Name Mapping|Map object names automatically);

    -- Prepare the tested application so that to maximize the time the 'wheel' will be visible on screen;

    -- Start script recording in TestComplete and trigger data retrieval in the tested application.

    Then, while the 'wheel' is on the screen, I would try to click it several times (with some delays between clicks) in order TestComplete to record these clicks.

    If you are lucky, TestComplete will record clicks on the 'wheel' object providing you with its full name.

    Hope, this might help...

3 Replies

  • AlexKaras's avatar
    AlexKaras
    Champion Level 3
    Also, in addition to what was said by Marsha, I would try the following:

    -- Disable automatic namemapping in TestComplete (Tools|Options|Engines|Name Mapping|Map object names automatically);

    -- Prepare the tested application so that to maximize the time the 'wheel' will be visible on screen;

    -- Start script recording in TestComplete and trigger data retrieval in the tested application.

    Then, while the 'wheel' is on the screen, I would try to click it several times (with some delays between clicks) in order TestComplete to record these clicks.

    If you are lucky, TestComplete will record clicks on the 'wheel' object providing you with its full name.

    Hope, this might help...
  • Marsha_R's avatar
    Marsha_R
    Champion Level 3
    We have a similar issue with data loading in a grid, except we don't even get a wheel!  Our data just loads in the background and the user might not even see it happen.  



    Because we don't have a clue about how long it will take to get the list loaded, we just put a Delay statement in and started with ms=10000 and experimented until it worked.  



    I know that's not the most elegant solution, but it's easier than trying to catch the wheel.



    However, if you really want to chase that darn wheel, I suggest the point-and-fix option for the mapping.  That's what I used to catch tooltips.
  • Thanks, that was helpful and I was able to 'catch' the progress indicator.



    David