Forum Discussion
mmkumaram
14 years agoOccasional Contributor
Ok, I shall use GridGroupingControl object to work with the table. All additional TestComplete methods(ClickCell,ClickColumnHeader,ClickRowIndicator) are really useful.
Regarding the filter row, I don't think so I can use Click method as I don't see the Filters cells as separate object. It seems to be part of the table. Spying WinFormsObject("grid_common_").Table.TableModel.Item(2, 1).CellType give the cell type as FilterBarCell, not sure why this row is not accessible on CellClick method. CellClick(0,0) actually represents the first cell next to filter row, but not the filter cell.(ref attached clickCell attachment).
I am able to add the filter to table by directly calling the .Net Assembly method(Thanks to TestComplete for providing this feature), i.e WinFormsObject("grid_common_").TableDescriptor.RecordFilters.Add(Sys.Process("Petrel").AppDomain("petrel.exe").dotNET.Syncfusion_Grouping.RecordFilterDescriptor.zctor_6("WellName",Sys.Process("Petrel").AppDomain("petrel.exe").dotNET.Syncfusion_Grouping.FilterCondition.zctor_2(Sys.Process("Petrel").AppDomain("petrel.exe").dotNET.Syncfusion_Grouping.FilterCompareOperator.Equals_2,"INJ1"))).
With this I could simulate the filter actions, but it would be good if we could simulate how the users would be doing, i,e clicking Filter cell and selecting the value from drop down.
Thanks,
Muthu
Regarding the filter row, I don't think so I can use Click method as I don't see the Filters cells as separate object. It seems to be part of the table. Spying WinFormsObject("grid_common_").Table.TableModel.Item(2, 1).CellType give the cell type as FilterBarCell, not sure why this row is not accessible on CellClick method. CellClick(0,0) actually represents the first cell next to filter row, but not the filter cell.(ref attached clickCell attachment).
I am able to add the filter to table by directly calling the .Net Assembly method(Thanks to TestComplete for providing this feature), i.e WinFormsObject("grid_common_").TableDescriptor.RecordFilters.Add(Sys.Process("Petrel").AppDomain("petrel.exe").dotNET.Syncfusion_Grouping.RecordFilterDescriptor.zctor_6("WellName",Sys.Process("Petrel").AppDomain("petrel.exe").dotNET.Syncfusion_Grouping.FilterCondition.zctor_2(Sys.Process("Petrel").AppDomain("petrel.exe").dotNET.Syncfusion_Grouping.FilterCompareOperator.Equals_2,"INJ1"))).
With this I could simulate the filter actions, but it would be good if we could simulate how the users would be doing, i,e clicking Filter cell and selecting the value from drop down.
Thanks,
Muthu