Automation with Word
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
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 ?
Thank you.
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
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...
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
I already tested this. It works in certain case, but not with Word.
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
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.
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
I don't understand. I don't use COM and don't want to use it. I would like to get my UIA Objects available, without exploring the object browser manually.
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
MSAA is based on the Component Object Model (COM). COM defines a mechanism for applications to communicate.
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Ok I didn't know that! Thanks, but that doesn't solve my problem.
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Do a Sys.Refresh() before the test steps having an issue.
