Forum Discussion
Hi Abed,
In this case, it looks like the only way to test the control is to call its native methods and properties from TestComplete. Can you see them in TestComplete’s Object Browser?
Hi Tanya,
Actually some of the internal properties and methods exist and appear in the Object Properties. However, using these properties and methods is not healthy, as you know, they are not available for user and don't really simulate user actions. Another thing, some other controls are not completely identified. For example, the toolbar buttons are identified as items, so no internal methods !
Here I need to riase something, in the tutorial SmartBeat mention that C1 is not full supported but toolbar is one of the supported controls. I'm not sure if this is really reflects the actuall situation.
Thanks,
Abed.
- Colin_McCrae9 years agoCommunity Hero
Be careful with things like DB grids and clever TreeView objects that are derived custom classes.
They are often derived for a reason as the devs had to do something clever (or annoying - depends on your viewpoint) in order to get them to work in a certain way - usually non-standard, otherwise why bother customising it?
For instance - using a Delphi DB type grid, I sometimes have to apply clicks to cells. However, "click" is not a native method of the cell. So I have to get the co-ordinates of the cell, relative to the parent grid, and then apply a click to that point on the grid in order to both click the cell and activate the event triggers that happen when it gets clicked on. But .... the only way to get accurate co-ordinates for the cell was a from a hidden away property called (I think ... from memory) "rect" which contained a further four sub-properties for the co-ordinates of the corners of the cell.
Similar with a TreeView object which as using custom checkboxes and embedded image value to activate event triggers which caused auto-checking to propogate up and down the tree. But again, you had to apply the click to the parent object in the correct place so getting co-ordinates and offsets was required again. The standard checkbox controls were there, but did nothing as thats not how they were using it.
If you can, speak to the devs. They'll know how they're using the control. Especially if it's a derived custom one.
Without the devs on hand, I would never have worked out how they were doing some things.
It's unfortunate, but thats just how it is sometimes.