Forum Discussion

bommareddy's avatar
bommareddy
Contributor
7 years ago

Unable to identify all rows in 'ui-grid-canvas'

Hi Team,

 

Test complete is unable to identify all the objects in the data grid. The data grid is dynamic i.e. it may contains 10 rows or 50 rows or more. But in object tree we are able to see only first 16 rows. Post when we scroll down, rows are starting from 0(zero) instead of increasing the number 17 and so on.

 

The data grid class name is 'ui-grid-canvas'. Is there any way to identify all the objects(rows) at a single shot? 

 

Please let me know if you require any other details in this regard. Attaching sample screen shot of datagrid

 

Regards, BommaReddy

4 Replies

  • shankar_r's avatar
    shankar_r
    Community Hero

    Hi,

     

    What are the child objects you are seeing it in Object Browser for the table? screenshot would be better.

     

    My guess is, Those rows might be visibility set to false.

  • Hi Shankar,

     

    I am attaching the screenshot of object hierarchy. Please find in the attchemnt

    • Marsha_R's avatar
      Marsha_R
      Champion Level 3

      So if you go to row 17 and try to name map it manually, does it show up as (16) or (15)?

  • AlexKaras's avatar
    AlexKaras
    Champion Level 3

    Hi,

     

    > Is there any way to identify all the objects(rows) at a single shot?

    As per your description of the problem and class name, it is my expectation that the grid does not contain all its records but only the visible records are generated dynamically by script. This is also the reason of why numbering always starts from zero while scrolling.

    I see two possible options:

    -- Talk to developers and ask them if they can provide you with something that will return you all records. For example, this may be some JScript property or method on the page that you can access/call directly (https://support.smartbear.com/testcomplete/docs/app-testing/web/general/common-tasks/javascript.html). Direct database query might be an option as well but usually it is less preferred;

    -- Scroll and analyze grid manually if you are not lucky and the previous option does not work.