This project is read-only.

Unable to work with ListView Control

Mar 22, 2010 at 11:01 AM

In one of our applications, we are facing aproblem in identifying the Listview control. This control is properly identified with QTP tool and the same is giving the problem when checked with Ui Automation using white's framework.

UIAVerify tool shows the following properties to this control:

Automation Id - " "

ClassName - "ListView20WndClass"

Name - " "

ControlType.Pane - "ControlType.Pane"

FrameworkId - "Win32"

IsContentElement - True

IsControlElement - True

LocalizedControlType - "Pane"

IsKeyBoradFocussable - False


What would you suggest us to fix this problem, as it is showstopper for us. Any help will be appreciated.

Mar 24, 2010 at 6:06 PM

This looks like Panel but if you are sure it is listview you can use AutomationElementFinder directly and find your way through by first finding the automationelements and then constructing appropriate white classes from it.

Mar 25, 2010 at 8:10 AM


Thanks for the reply.  We have these kind of controls at many places in our applications. If a control is identified as Pane, then its difficult to identify the control, because its not accessible using MSAA or UIAutomation or White. and the supported patterns are zero.The same kind of controls are properly identified with QTP, so what would you suggest us to work with these kinds of controls in Ui Automation?

Any help or workaround will be appreciated.




Aug 5, 2010 at 9:17 AM

I also need the help. We've a lot of VB Listview controls like this. Can any people kindly give advice please?




Aug 21, 2013 at 3:02 PM
I also came across this issue when trying to use White. I have a few ListView20WndClass controls in an application that I need to automate, but White only sees it as "Pane". I'd like to still use White because of other concerns, but I might have use other tools.

AutoIT, PowerShell, and other tools are able to interact with ListView20WndClass controls:
  • AutoIT has a set of functions in GuiListView.au3 that show how to use the Control's Windows Handle to get/set data on the ListView. It works and it is simple to use, albeit I'm having other issues with AutoIT (it can't walk the applications control tree, so I have to get the handle from UIAVerify and paste it in the script).
  • PowerShell can also do it in a similar fashion (albeit it is less developed).
  • You can even use VB (it requires to allocate memory in the host process).
Do you have any guidance on how to use AutomationElementFinder? Would it be possible to get the ListView pattern applied to these controls? Would that even work? I'm not familiar enough with UIA and I haven't found documentation on AutomationElementFinder.

Maybe we could use AutomationElement's NativeWindowHandle to send messages to it (using the code from other tools as a guide w/o having to go back to the Win32 API documentation). However, that seems like a lot of duplication of effort (and confusion) with the existing ListView.