This project is read-only.

Unable to locate the Win32 control in White but it's visible in the UIA verify

Nov 7, 2012 at 5:24 AM
Edited Nov 7, 2012 at 6:01 AM


I am doing an automation of Win32 application. I have to access the combo box present inside the Child Window -> Tab -> Tab page. I can locate till Tab pages in White framework but unable to locate the control(Combo box) present inside the tab page.

Surprising thing is, UIA verify is showing that combo box means this can be automate but White is not showing in the mainwindow, Subwindow or Tab pages items.

One more tricky thing in UIA verify is, Tab pages are shown Inside Tab -> Pane -> Tab pages and combo box. So that combo box is separete from the Tab page it consists in.

Can one have any idea on how to access such situation in White?

Please let me know if more details are required.


Nov 25, 2012 at 6:19 AM
Edited Nov 25, 2012 at 6:21 AM

Can you see the ComboBox in View -> 'Control view' when using UISpy? Then try look the control in 'Raw view'. If you can see it in RawView only, then you are forced to use pure UIA and RawViewWalker to detect the control (correct me if I'm wrong). When you find it using pure UIA, you can construct a White ComboBox from AutomationElement found by UIA.

From my not so long experience with White I found that we cannot use White ONLY, it has bugs and has no documentation, but it's cool for thing it can be applied. Sometimes you have to use pure UIA. The reason are custom controls. Developers of such controls don't think about exposing their custom controls to UIA, additional work is required for that.

For me White if just one of the tools which helps me in Automation. When I can use White -- its cool, I use it, and my code is more beautiful and short. If not - I switch to pure UI Automation. To make work with UIA easier, you can write your own wrappers.

Check out the links below to get more details


Nov 26, 2012 at 4:29 PM

I concur with trickbz here. I too use a combination of White and UIAutomation. I would also add that I rarely use the UIAVerify tool but instead opt for Inspect. Inspect tends to detect anything but that not everything is then detected by White or by UIAutomation. According to Microsoft, Inspect uses a combination of Managed and Native code to detect and navigate through controls and if it can't detect a control using Managed code, it switches back to Native.