Forum Discussion
I don't have any, personally, no. All the grids and such that I work with are fully supported by TestComplete and recognized as components with rows, columns, cells, etc. So, I'm not sure how much help I'm going to be with that. Perhaps there's someone else that can give more help to you. Keep in mind, any such work will be unique to that grid and may not apply to yours. You will need to work with the native properties and methods of the grid component. Find that grid in your Object Browser (not the sub panels, etc), and start examining all the properties and methods. Refer to the documentation for the grid to understand what's there and how to use it. It's going to take code work to get this to work but it can be done.
We are trying to use FindChild to identify the object. If the object is identfied then we can use Testcomplete properties and methods. But there is a problem testcomplete IDE do not display the methods and properties while coding.
For e.g.
var STVDEGCGrid = Aliases.browser.pageApplicationNavigator.frameBannerhs.formFrames7.panelPnlstvdegc1canvas.panelGrdstvdegc;
var propCodeArray = new Array("ObjectType","contentText");
var valueCodeArray = new Array("Panel","ADN");
var codeColumnValue1 = STVDEGCGrid.FindChild(propCodeArray,valueCodeArray,10);
if(codeColumnValue1.Exists){
Log.Message("hello");
Log.message(codeColumnValue1.);
}
after typing codeColumnvalue1. it do not display any properties and methods ?
Please advise
Let me know if more information is required
Thanks
Nishchal
- tristaanogre6 years agoEsteemed Contributor
Correct... because FindChild is not executed during design time so it doesn't know what methods or properties it will have (if any). That's where using Object Spy and/or Object Browser is how you're going to have to get those things. This is a manual process.
- nisgupta6 years agoValued Contributor
But I have seen sometimes it show the code completion for the object returned by FindChild methods ? Is it expected ?
Or they will not show code completion ?
Thanks
Nishchal
- tristaanogre6 years agoEsteemed Contributor
Honestly, I would not expect FindChild to return anything for code completion so that fact that you ARE getting it on occasion is a surprise to me.
- nisgupta6 years agoValued Contributor
I am working on the grid where the 2 columns make the row unique.
I have attached the screenshot ftvorgn_ss.png
second attachment showing testcomplete code in javascript.
Got the error
"You are trying to call the "Parent" method or property of an object that does not exist."Please advise.ThanksNishchal - tristaanogre6 years agoEsteemed Contributor
Exactly as the message indicates... you have an object... you are trying to access it's parent through that object... but the original object, for some reason, no longer exist. Something changed in the middle there. Before you use an object, if there is a chance that the object is destroyed in the process, always check for existance.
- nisgupta6 years agoValued Contributor
The object does not exist on the first page . We have pagination and the object exist on the 3rd page . in the script While condition become true and it should clcik on next page but it through the error .
- tristaanogre6 years agoEsteemed Contributor
You cannot call "Exists" on an object that does not exist. Your while should FIRST check for exists... and then, once the object exists, THEN call the Parent object. You cannot call the method or property of an object that does not exist, this includes the "Exists" property. You need to alter your "While" loop...
Related Content
- 2 years ago
- 2 years ago
- 2 years ago
Recent Discussions
- 13 hours ago
- 2 days ago