UI Automation with ActiveX controls

Dec 24, 2009 at 3:38 AM

We were previously working with QTP.  Our applications contain Vb Controls, Standard window controls and activex controls. We used to proceed with VB and Activex add-ins with QTP and when we spy a control, we used to get the hierarchy as : VbWindow-> ActiveX-> ActiveX->ActiveX.

If we spy the same control with UiVerifyTool, i do not see any ActiveX controls in the hierarchy. We don't know what is the exact reason behind it.

In our applications, as we are going to see manyActiveX controls, how do we need to proceed further. Few of ActiveX controls are identified as 'Pane' controls for which there are no patterns supported.

We were proceeding with QTP in dealing with ActiveX controls, but now we are struck up in dealing with the same ActiveX controls using UI Automation. Is thier a way to support  ActiveX control susing UiAutomation? if yes, how??? Please suggest us.


Dec 25, 2009 at 6:45 AM

Can you do window.LogStructure() and see what is displayed. It would show you all the elements which are understood by UIAutomation.

Dec 28, 2009 at 4:20 AM

When tried to get the value for 'mainWnd.LogStructure()'...i got the following  "Expression has been evaluated and has no value".

For one of the SSTREE control in our application, following is the hierarchy when spy is done with two different tools:

UIAVerify Tool : Pane-> Window->Pane->Pane->Pane->Pane->Pane

QTP SPy Tool: VbWindow->ActiveX->ActiveX ->ActiveX


Let me know your inputs on how to proceed further.


Jan 28, 2010 at 3:42 AM


Could you please confirm that Ui Automation does not support ActiveX controls? We see that QTP supports ActiveX controls fully, so do you suggest us not to use UiAutomation, if our application contains most of the ActiveX controls?

Jan 28, 2010 at 3:19 PM

so in UIAVerify do you see the panes for activex control or it is for the containers of the activex control?

Jan 29, 2010 at 2:40 AM


 I am very much thankful to you for responding. I am struck up with this issue. UIAVerify identifies the ‘ActiveX’ controls as ‘Panes’. Please see the hierarchy when spy is done using QTP spy and UIAVerify tool: 

UIAVerify Tool : Pane-> Window->Pane->Pane->Pane->Pane->Pane

QTP SPy Tool: VbWindow->ActiveX->ActiveX ->ActiveX

We want at least some workaround to proceed further.

Feb 5, 2010 at 10:10 AM

Panes are automatable using white. You need to use Custom UIItem approach in white to automate these.

Feb 5, 2010 at 10:42 AM

Could you please give me provide me an example to a pane for which the supported patterns are zero?

Feb 10, 2010 at 5:40 AM

You should be able to click or enter text in them. Click is available on all UIItems including pane and text can be entered using Keyboard.Instance....


Feb 10, 2010 at 5:52 AM

Thanks Vivek. I am okay to use keyboard instance for setting input. But how can i do click action if the control (i.e. pane) doesnot support any patterns. Moreover how do i locate the object for performing click action whose  position is dynamic like an item in a tree view ?