Forum Discussion
I let GPT have a go... This may allow you get a richer version of the tree and run a find method against it instead. However it's only a little better than flying blind because you can't browse the objects. This does keep it out of the project scope. I don't know if it will work. I have bever tried it. Maybe some clues for a slick way to solve this here?
function getTree() {
var p = Sys.Process("Intepro");
var tree = null;
try {
tree = p.UIAObject("TDBTree"); // UIA first
if (!tree.Exists)
tree = p.VCLNETObject("DBTree"); // fallback
} catch (ex) {
tree = p.VCLNETObject("DBTree");
}
return tree;
}
var treeObj = getTree();
Log.Message("Found: " + treeObj.FullName);
- scot19673 days ago
Champion Level 3
🤣 I ran round a circle here... This is more or less what you were doing in the first place minus the MSAA thing... Well... So if you have verified vlcNetTree is valid and added a valid PropertyName, Value and Depth in the parameters for findchild use FindAllChildren to return an array of what objects are there if any...
https://support.smartbear.com/testcomplete/docs/reference/test-objects/members/common-for-all/findallchildren-method.html- BD_Geoactive3 days agoOccasional Contributor
wow, thanks for all your effort to try and help me. I shall give it a try again once I can. I will update my progress in this post. Cheers
Note: I have written a script for trying to find the parent tree (VLCNETObject) . it is there and found it...but I couldn't dive deeper than that just yet.