Automation of ActiveXControls

Oct 28, 2008 at 12:51 AM
I have an app that uses ActiveX controls everywhere.

I can get the AutomationElement for the ActiveX control I want to interact with. How do I get access to it's IUnkonwn or IDispatch interfaces to allow me to call methods on it?

Thanks
Nigel
Coordinator
Oct 28, 2008 at 1:08 PM
You cannot do this using UIAutomation or white. These can be used only for interacting with UI elements.
Oct 29, 2008 at 7:00 AM
Sorry I wasn't clear... In this case the ActiveX control is an old UltraGrid. The other ActiveX buttons and things all work fine.

I was at a point where I was thinking "well it's impossible" then I used QTP to test the same app and it managed to get hold of the control so I could invoke methods on it (like GetRow). This proved to me that it is possible. I just know how.

I'm hoping that posting this here will prompt some discussion and ideas. I'm sure some other users will hit the same issue of wishing to automate testing of an old ActiveX GUI control (although I hope for their sakes they don't).

Any/all advice welcomed
Cheers
Nigel
Dec 8, 2008 at 6:43 PM
Edited Dec 8, 2008 at 6:45 PM
Hi, I also am interested in automation testing of ActiveX custom third party grid controls that we have in our legacy applications (specifically ProtoView Grid). Can someone please comment on this? Is it possible to hook in, write plugins/adapters to allow testing it?

Thanks,
Kuba
Coordinator
Dec 14, 2008 at 8:59 AM
This discussion has been copied to a work item. Click here to go to the work item and continue the discussion.