pyWinAuto: pywinauto.controls.common_controls.TreeViewWrapper -- Class that wraps Windows TreeView common control

TreeViewWrapper

Class that wraps Windows TreeView common control


Attributes

a handle

None

a windowclasses

['SysTreeView32', 'WindowsForms\\d*\\.SysTreeView32\\..*']

a friendlyclassname

'TreeView'

Methods

f __eq__(self, other) ...

Returns True if the handles of both controls are the same

f __init__(self, hwnd) ...

Initialise the instance

f ItemCount(self) ...

Return the count of the items in the treeview

f Texts(self) ...

Return all the text for the tree view

f Root(self) ...

Return the root element of the tree view

f GetProperties(self) ...

Get the properties for the control as a dictionary

f GetItem(self, path) ...

Read the TreeView item

  • path the path to the item to return. This can be one of the following:
    • A string separated by characters. The first character must be . This string is split on the characters and each of these is used to find the specific child at each level. The represents the root item - so you don't need to specify the root itself.
    • A list/tuple of strings - The first item should be the root element.
    • A list/tuple of integers - The first item should be 0 representing the root element.

f Select(self, path) ...

Select the treeview item

f IsSelected(self, path) ...

Return True if the item is selected

f EnsureVisible(self, path) ...

Make sure that the TreeView item is visible

See the source for more information.