Forum Discussion
HKosova
14 years agoSmartBear Alumni (Retired)
Hi Andrew,
The situation with AdvancedDataGrid here is similar to the one with DataGrid. To work with grid elements, it is recommended that you target the grid object itself -- AdvancedDataGrid("stationGrid") -- rather than the element renderers (AdvancedListBaseContentHolder, etc).
Unfortunately, TestComplete doesn't provide any extended methods and properties for automating Flex AdvancedDataGrid like it does for DataGrid, but you might be able to perform the needed actions with the grid's native methods and properties. You can access these native methods and properties in the Object Spy and your tests via the grid's FlexObject property. To see an example of the native methods' use in tests, check out the Work with AdvancedDataGrid sample script.
For example, to find a grid row by the cell value, you can iterate through the grid's rows (which should be accessible via AdvancedDataGrid("stationGrid").dataProvider.source.item(rowIndex)) and check the values in the appropriate data field. I'm afraid, I can't come up with a concrete detailed algorithm and script code for your entire task, because your grid seems to be customized, but I hope you get the idea.
BTW, you can submit a feature request for the extended AdvancedDataGrid support here, and if it gets enough votes, the TestComplete team will consider adding it to the roadmap for future versions.
The situation with AdvancedDataGrid here is similar to the one with DataGrid. To work with grid elements, it is recommended that you target the grid object itself -- AdvancedDataGrid("stationGrid") -- rather than the element renderers (AdvancedListBaseContentHolder, etc).
Unfortunately, TestComplete doesn't provide any extended methods and properties for automating Flex AdvancedDataGrid like it does for DataGrid, but you might be able to perform the needed actions with the grid's native methods and properties. You can access these native methods and properties in the Object Spy and your tests via the grid's FlexObject property. To see an example of the native methods' use in tests, check out the Work with AdvancedDataGrid sample script.
For example, to find a grid row by the cell value, you can iterate through the grid's rows (which should be accessible via AdvancedDataGrid("stationGrid").dataProvider.source.item(rowIndex)) and check the values in the appropriate data field. I'm afraid, I can't come up with a concrete detailed algorithm and script code for your entire task, because your grid seems to be customized, but I hope you get the idea.
BTW, you can submit a feature request for the extended AdvancedDataGrid support here, and if it gets enough votes, the TestComplete team will consider adding it to the roadmap for future versions.
Related Content
- 11 years ago
- 5 years ago
- 10 years ago
- 10 years ago
Recent Discussions
- 4 days ago
- 4 days ago
- 8 days ago