Forum Discussion

tinauser's avatar
tinauser
Frequent Contributor
14 years ago

Testing virtualized grid

Hallo,

I need to test a wpf datagrid which makes use of the UI virtualization.

I need to test a specific row of the grid: what is the best way to find out the content of a specific row (obviously, is not on scree when i open the window, therefore the object is not instantiated yet).

3 Replies

  • Lorenzo,


    What DataGrid control are you using? If it is a grid control that is supported by TestComplete (for instance, Microsoft WPF DataGrid), try using the wValue(Row, Column) property that TestComplete provides for these controls.


    If you are using some other grid control that is not supported by TestComplete, then you have to use the grid's native methods and properties to scroll the grid's contents to the needed row and extract the row contents.


    To determine which methods and properties to use, see the grid control documentation or talk to your developers.

    TestComplete provides access to native methods and properties of WPF objects. To view which methods and properties are available for it, launch your application and explore it in the Object Browser panel.

  • tinauser's avatar
    tinauser
    Frequent Contributor
    Hallo Alex, thank you for the answer.

    The grid come from a third party, I guess:



    http://xceed.com/Grid_WPF_Intro.html



    I´ll try to talk to developers. If there is no methods to get a specific row, do you think it makes sense to ask the developers to add such a method for testing purpose?



    Thanks a lot



    Lorenzo
  • Hi Lorenzo,


    I was unable to find Xceed WPF DataGrid in the list of controls supported by TestComplete. This means that, most likely, you will not be able to use the wValue property. Unfortunately, I cannot check that myself as I didn't find a working sample of the grid.


    Anyhow, TestComplete has access to native methods and properties of WPF applications, that is, it has access to the same methods and properties that developers use in source code. So, I suggest that you talk to the developers and ask them to explain how to retrieve data. And asking them for a special data-access method sounds like a really good idea.


    Btw, you can vote for the Xceed WPF DataGrid support on the following page. Your vote will increase the control's rating in user requests:

    http://smartbear.com/products/qa-tools/automated-testing/survey/.