Forum Discussion

guillaume's avatar
guillaume
Contributor
13 years ago

Store content from C# DataGridView for object comparison

Hi.



I would like to get some advice concerning the easiest solution to compare (and store) DataGridView content.

My application is an open application and thus TestComplete is able to access the datas inserted in the grid.



Here is the scenario I would like to set but unfortunately TestComplete does not let me do so.



Step 1 : Load some data, check the data is not sorted.

Step 2 : Sort the data by double clicking on a column.

Step 3 : Get the data and compare the order with an array, or some object properties store within TestComplete.



I tried to use ObjectCheckPoint but when I created a new CheckPoint, I am unable to get properties for the content.

I can only store useless properties for the datagridview object like the index, the style, etc.



Do you guys have any idea about how to solve my issue ?

I would really like to be able to store the object's content once for all and then compare at runtime that it matches the expected order; but if you figure out something else, please, let me know.



Regards,



Guillaume.



Edit : I am using TC 8.60. Just in case.

1 Reply

  • Okay, I found the solution.

    If anybody needs something similar :



    The DataGridView I was trying to test is similar to Microsoft DatagridView.

    Thus, in the Object Mapping tab of the project properties panel, I added the class name of my object in the Microsoft Controls | DatagridView item.

    I was then able to use TestComplete TableCheckpoint and store in a table the data retrived.



    The TableCheckpoint is really an awesome feature.