Automation with Word
Hi everyone !
I am facing an annoying issue with word automation. I use both MSAA and UIA recognition to get objects for my needs. The problem is that TC doesn't refresh the object tree properly when my routines are executed. (Find Method with refresh at true for example). The only way to refresh the object tree, is to use the object browser, expand every parent object to the desired child object then if I get lucky, the object is not greyed anymore and become available.
All these objects are not available via COM. (they are custom objects created by a plugin for Word). So the only way is to use UIAObjects recognition or MSAA.
How can I force TC to refresh and detect these objects properly ?
Try to force refreshing the tree before FindChild or FindChildEx. Sometimes it helps. https://support.smartbear.com/testcomplete/docs/reference/test-objects/members/common-for-all/refres...
I haven't worked with Component Object Model (COM) for a very long time, but I think it will only expose its methods when you interact with its interface (or query its interface). Enumerating the methods and properties exposed by a COM could possibly slow the application down.