Thanks for the reply Tanya. I've actually solved this issue. I found that the bounds for a UIA object should be screen coordinates and not relative to the current coordinate system. I do however have another question. I've already posted this question on the SqaForums but I have not had a response in about a week. Up until now we have been using Custom Extensions to automate our own custom control but we want to use a better strategy for our future releases. We considered AutomationPeers; however, after investigating TestComplete's UIA objects and the support for AutomationPeers it seems like it doesn't allow for much, if any, customization. "...if your application implements a custom provider exposing specific properties, they will not be available to TestComplete." I got this quote from here:
http://support.smartbear.com/viewarticle/30724/. That seems to be true, but it also doesn't seem to be possible to expose any methods or properties in even the standard providers written by Microsoft.
The following has been my approach up till now. I have a custom automation peer class that inherits AutomationPeer and implements a standard provider like IScrollItemProvider. In TestComplete I can see the UIA object and all the standard AutomationPeer properties but none of the IScrollItemProvider properties or methods. I understand that a custom provider like ICustomProvider wouldn't work, but why wouldn't the standard ones work? Am I missing something or is this just not supported? Thanks again.