How to automate a grid belonging to ApexGrid in Te

2019-09-03 02:38发布

I have a grid in my application and I spied using the TestComplete tool. It identifies its WndClass as "TG60.ApexGrid32.20". I am not able to get the number of cells or rows properly. Anyone has any experience with objects of this class? Does any other application support this class? Any help would be greatly appreciated!

2条回答
老娘就宠你
2楼-- · 2019-09-03 03:27

I haven't used this grid but I guess it is a case of a virtual table.

virtual tables are built in runtime so you can't access the data by cells because the cells don't yet exist while you try reaching them.

what you need to do is scroll through the whole table and get all the rows by "scanning" the table.

查看更多
三岁会撩人
3楼-- · 2019-09-03 03:27

Your grid seems to be Apex True DBGrid (which later became ComponentOne True DBGrid). If not, update your question.

TestComplete doesn't support True DBGrid out of the box, but you can use the grid's native properties and methods for automation. For example, you can use the native Columns.Count property to get the number of columns.

Here're examples of automating True DBGrid using its native members:

Click cells

Click row indicators

To see what properties and methods you can use for automation, examine your grid in TestComplete's Object Browser. You can also check the True DBGrid documentation, but it applies to the latest True DBGrid version and may not apply to earlier versions.

查看更多
登录 后发表回答