企业🤖AI Agent构建引擎,智能编排和调试,一键部署,支持私有化部署方案 广告
# pywinauto.controls.common_controls 包装Windows Common控件的类 [TOC] ## *class* `pywinauto.controls.common_controls._toolbar_button(index_, tb_handle)` Bases: `object` 工具栏按钮(TBBUTTONINFO)项目周围的包装 ### `click`(*button='left'*, *pressed=''*) Click on the Toolbar button ### `click_input`(*button='left'*, *double=False*, *wheel\_dist=0*, *pressed=''*) Click on the Toolbar button ### `has_style`(*style*) Return True if the button has the specified style ### `is_checkable`() Return if the button can be checked ### `is_checked`() Return if the button is in the checked state ### `is_enabled`() Return if the button is in the pressed state ### `is_pressable`() Return if the button can be pressed ### `is_pressed`() Return if the button is in the pressed state ### `rectangle`() Get the rectangle of a button on the toolbar ### `state`() Return the state of the button ### `style`() Return the style of the button ### `text`() Return the text of the button ## *class* `pywinauto.controls.common_controls._treeview_element(elem, tv_handle)` Bases: `object` Wrapper around TreeView items ### `children`() Return the direct children of this control ### `click`(*button='left'*, *double=False*, *where='text'*, *pressed=''*) Click on the treeview item where can be any one of “text”, “icon”, “button”, “check” defaults to “text” ### `click_input`(*button='left'*, *double=False*, *wheel\_dist=0*, *where='text'*, *pressed=''*) Click on the treeview item where can be any one of “text”, “icon”, “button”, “check” defaults to “text” ### `client_rect`(*text\_area\_rect=True*) Return a rectangle of a text area of the item If **text\_area\_rect** is set to False then it will return a rectangle for the whole item (usually left is equal to 0). Defaults to True - which returns just the rectangle of the text of the item ### `collapse`() Collapse the children of this tree view item ### `drop`(*button='left'*, *pressed=''*) Drop at the item ### `ensure_visible`() Make sure that the TreeView item is visible ### `expand`() Expand the children of this tree view item ### `get_child`(*child\_spec*, *exact=False*) Return the child item of this item Accepts either a string or an index. If a string is passed then it returns the child item with the best match for the string. ### `is_checked`() Return whether the TreeView item is checked or not ### `is_expanded`() Indicate that the TreeView item is selected or not ### `is_selected`() Indicate that the TreeView item is selected or not ### `item`() Return the item itself ### `next_item`() Return the next item ### `select`() Select the TreeView item ### `start_dragging`(*button='left'*, *pressed=''*) Start dragging the item ### `state`() Return the state of the item ### `sub_elements`() Return the list of children of this control ### `text`() Return the text of the item ## *class* `pywinauto.controls.common_controls._listview_item(lv_ctrl, item_index, subitem_index=0)` Bases: `object` Wrapper around ListView items ### `check`() Check the ListView item ### `click`(*button='left'*, *double=False*, *where='text'*, *pressed=''*) Click on the list view item where can be any one of “all”, “icon”, “text”, “select”, “check” defaults to “text” ### `click_input`(*button='left'*, *double=False*, *wheel\_dist=0*, *where='text'*, *pressed=''*) Click on the list view item where can be any one of “all”, “icon”, “text”, “select”, “check” defaults to “text” ### `deselect`() Mark the item as not selected The ListView control must be enabled and visible before an Item can be selected otherwise an exception is raised ### `ensure_visible`() Make sure that the ListView item is visible ### `image`() Return the image index of the item ### `indent`() Return the indent of the item ### `inplace_control`(*friendly\_class\_name=''*) Return the editor HwndWrapper of the item Possible `friendly_class_name` values: * `""` Return the first appeared in-place control * `"friendlyclassname"` Returns editor with particular friendlyclassname ### `is_checked`() Return whether the ListView item is checked or not ### `is_focused`() Return True if the item has the focus ### `is_selected`() Return True if the item is selected ### `item`() Return the item itself (LVITEM instance) ### `item_data`() Return the item data (dictionary) ### `rectangle`(*area='all'*) Return the rectangle of the item. Possible `area` values: * `"all"` Returns the bounding rectangle of the entire item, including the icon and label. * `"icon"` Returns the bounding rectangle of the icon or small icon. * `"text"` Returns the bounding rectangle of the item text. * `"select"` Returns the union of the “icon” and “text” rectangles, but excludes columns in report view. ### `select`() Mark the item as selected The ListView control must be enabled and visible before an Item can be selected otherwise an exception is raised ### `state`() Return the state of the item ### `text`() Return the text of the item ### `uncheck`() Uncheck the ListView item ## *class* `pywinauto.controls.common_controls.AnimationWrapper(element_info)` Bases: [`pywinauto.controls.hwndwrapper.HwndWrapper`](pywinauto.controls.hwndwrapper.html#pywinauto.controls.hwndwrapper.HwndWrapper "pywinauto.controls.hwndwrapper.HwndWrapper") Class that wraps Windows Animation common control ### `friendlyclassname` *= 'Animation'* ### `windowclasses` *= \['SysAnimate32'\]* ## *class* `pywinauto.controls.common_controls.CalendarWrapper(hwnd)` Bases: [`pywinauto.controls.hwndwrapper.HwndWrapper`](pywinauto.controls.hwndwrapper.html#pywinauto.controls.hwndwrapper.HwndWrapper "pywinauto.controls.hwndwrapper.HwndWrapper") Class that wraps Windows Calendar common control ### `calc_min_rectangle`(*left*, *top*, *right*, *bottom*) Calculates the minimum size that a rectangle needs to be to fit that number of calendars ### `count`() Get the calendars count ### `friendlyclassname` *= 'Calendar'* ### `get_border`() Get the calendar border ### `get_current_date`() Get the currently selected date ### `get_first_weekday`() Get is not in current locale and if so first day of the week ### `get_id`() Get type of calendar ### `get_month_delta`() Retrieves the scroll rate for a month calendar control ### `get_month_range`(*scope\_of\_range*) Retrieves date information that represents the high and low limits of a month calendar control’s display. ### `get_today`() Get today date ### `get_view`() Get the calendar view ### `has_title` *= False* ### `hit_test`(*x*, *y*) Determines which portion of a month calendar control is at a given point on the screen ### `place_in_calendar` *= {'background': , 'month\_background': , 'text': , 'title\_background': , 'title\_text': , 'trailing\_text': }* ### `set_border`(*border*) Set the calendar border ### `set_color`(*place\_of\_color*, *red*, *green*, *blue*) Set some color in some place of calendar which you specify. Receive four parameters: - The first parameter may take few variants below: ‘background’, ‘month\_background’, ‘text’, ‘title\_background’, ‘title\_text’, ‘trailing\_text’ ; - All other parameters should be integer from 0 to 255. ### `set_current_date`(*year*, *month*, *day\_of\_week*, *day*) Set the currently selected date ### `set_day_states`(*month\_states*) Sets the day states for all months that are currently visible ### `set_first_weekday`(*dayNum*) Set first day of the week ### `set_id`(*ID*) Set the calendar type. Receive only one parameter, which takes variants below: ‘gregorian’, ‘gregorian\_us’, ‘japan’, ‘taiwan’, ‘korea’, ‘hijri’, ‘thai’, ‘hebrew’, ‘gregorian\_me\_french’, ‘gregorian\_arabic’, ‘gregorian\_english\_xlit’, ‘gregorian\_french\_xlit’, ‘umalqura’ ### `set_month_delta`(*delta*) Sets the scroll rate for a month calendar control. ### `set_today`(*year*, *month*, *day*) Set today date ### `set_view`(*viewType*) Set the calendar view ### `windowclasses` *= \['SysMonthCal32'\]* ## *class* `pywinauto.controls.common_controls.ComboBoxExWrapper(element_info)` Bases: [`pywinauto.controls.hwndwrapper.HwndWrapper`](pywinauto.controls.hwndwrapper.html#pywinauto.controls.hwndwrapper.HwndWrapper "pywinauto.controls.hwndwrapper.HwndWrapper") Class that wraps Windows ComboBoxEx common control ### `friendlyclassname` *= 'ComboBoxEx'* ### `has_title` *= False* ### `windowclasses` *= \['ComboBoxEx32'\]* ## *class* `pywinauto.controls.common_controls.DateTimePickerWrapper(element_info)` Bases: [`pywinauto.controls.hwndwrapper.HwndWrapper`](pywinauto.controls.hwndwrapper.html#pywinauto.controls.hwndwrapper.HwndWrapper "pywinauto.controls.hwndwrapper.HwndWrapper") Class that wraps Windows DateTimePicker common control ### `GetTime`(*\*args*, *\*\*kwargs*) ### `SetTime`(*\*args*, *\*\*kwargs*) ### `friendlyclassname` *= 'DateTimePicker'* ### `get_time`() Get the currently selected time ### `has_title` *= False* ### `set_time`(*year=0*, *month=0*, *day\_of\_week=0*, *day=0*, *hour=0*, *minute=0*, *second=0*, *milliseconds=0*) Set the currently selected time ### `windowclasses` *= \['SysDateTimePick32', 'WindowsForms\\\\d\*\\\\.SysDateTimePick32\\\\..\*'\]* ## *class* `pywinauto.controls.common_controls.HeaderWrapper(*hwnd*)` Bases: [`pywinauto.controls.hwndwrapper.HwndWrapper`](pywinauto.controls.hwndwrapper.html#pywinauto.controls.hwndwrapper.HwndWrapper "pywinauto.controls.hwndwrapper.HwndWrapper") Class that wraps Windows ListView Header common control ### `GetColumnRectangle`(*\*args*, *\*\*kwargs*) ### `GetColumnText`(*\*args*, *\*\*kwargs*) ### `ItemCount`(*\*args*, *\*\*kwargs*) ### `client_rects`() Return all the client rectangles for the header control ### `friendlyclassname` *= 'Header'* ### `get_column_rectangle`(*column\_index*) Return the rectangle for the column specified by column\_index ### `get_column_text`(*column\_index*) Return the text for the column specified by column\_index ### `item_count`() Return the number of columns in this header ### `texts`() Return the texts of the Header control ### `windowclasses` *= \['SysHeader32', 'msvb\_lib\_header'\]* ## *class* `pywinauto.controls.common_controls.HotkeyWrapper(*element\_info*)` Bases: [`pywinauto.controls.hwndwrapper.HwndWrapper`](pywinauto.controls.hwndwrapper.html#pywinauto.controls.hwndwrapper.HwndWrapper "pywinauto.controls.hwndwrapper.HwndWrapper") Class that wraps Windows Hotkey common control ### `friendlyclassname` *= 'Hotkey'* ### `has_title` *= False* ### `windowclasses` *= \['msctls\_hotkey32'\]* ## *class* `pywinauto.controls.common_controls.IPAddressWrapper(element_info)` Bases: [`pywinauto.controls.hwndwrapper.HwndWrapper`](pywinauto.controls.hwndwrapper.html#pywinauto.controls.hwndwrapper.HwndWrapper "pywinauto.controls.hwndwrapper.HwndWrapper") Class that wraps Windows IPAddress common control ### `friendlyclassname` *= 'IPAddress'* ### `has_title` *= False* ### `windowclasses` *= \['SysIPAddress32'\]* ## *class* `pywinauto.controls.common_controls.ListViewWrapper(*hwnd*)` Bases: [`pywinauto.controls.hwndwrapper.HwndWrapper`](pywinauto.controls.hwndwrapper.html#pywinauto.controls.hwndwrapper.HwndWrapper "pywinauto.controls.hwndwrapper.HwndWrapper") Class that wraps Windows ListView common control This class derives from HwndWrapper - so has all the methods o that class also >[info]**see** [hwndwrapper.HwndWrapper](class-pywinauto.controls.hwndwrapper.HwndWrapper.html) ### `Check`(*\*args*, *\*\*kwargs*) ### `ColumnCount`(*\*args*, *\*\*kwargs*) ### `ColumnWidths`(*\*args*, *\*\*kwargs*) ### `Columns`(*\*args*, *\*\*kwargs*) ### `Deselect`(*\*args*, *\*\*kwargs*) ### `GetColumn`(*\*args*, *\*\*kwargs*) ### `GetHeaderControl`(*\*args*, *\*\*kwargs*) ### `GetItem`(*\*args*, *\*\*kwargs*) ### `GetItemRect`(*\*args*, *\*\*kwargs*) ### `GetSelectedCount`(*\*args*, *\*\*kwargs*) ### `IsFocused`(*\*args*, *\*\*kwargs*) ### `IsSelected`(*\*args*, *\*\*kwargs*) ### `Item`(*\*args*, *\*\*kwargs*) ### `ItemCount`(*\*args*, *\*\*kwargs*) ### `Items`(*\*args*, *\*\*kwargs*) ### `Select`(*\*args*, *\*\*kwargs*) ### `UnCheck`(*\*args*, *\*\*kwargs*) ### `check`(*item*) Check the ListView item ### `column_count`() Return the number of columns ### `column_widths`() Return a list of all the column widths ### `columns`() Get the information on the columns of the ListView ### `deselect`(*item*) Mark the item as not selected The ListView control must be enabled and visible before an Item can be selected otherwise an exception is raised ### `friendlyclassname` *= 'ListView'* ### `get_column`(*col\_index*) Get the information for a column of the ListView ### `get_header_control`() Returns the Header control associated with the ListView ### `get_item`(*item\_index*, *subitem\_index=0*) Return the item of the list view” * **item\_index** Can be either an index of the item or a string with the text of the item you want returned. * **subitem\_index** A zero based index of the item you want returned. Defaults to 0. ### `get_item_rect`(*item\_index*) Return the bounding rectangle of the list view item ### `get_selected_count`() Return the number of selected items ### `is_checked`(*item*) Return whether the ListView item is checked or not ### `is_focused`(*item*) Return True if the item has the focus ### `is_selected`(*item*) Return True if the item is selected ### `item`(*item\_index*, *subitem\_index=0*) Return the item of the list view” * **item\_index** Can be either an index of the item or a string with the text of the item you want returned. * **subitem\_index** A zero based index of the item you want returned. Defaults to 0. ### `item_count`() The number of items in the ListView ### `items`() Get all the items in the list view ### `select`(*item*) Mark the item as selected The ListView control must be enabled and visible before an Item can be selected otherwise an exception is raised ### `texts`() Get the texts for the ListView control ### `uncheck`(*item*) Uncheck the ListView item ### `windowclasses` *= \['SysListView32', 'WindowsForms\\\\d\*\\\\.SysListView32\\\\..\*', 'TSysListView', 'ListView.\*WndClass'\]* ### `writable_props` Extend default properties list. ## *class* `pywinauto.controls.common_controls.PagerWrapper(element_info)` Bases: [`pywinauto.controls.hwndwrapper.HwndWrapper`](pywinauto.controls.hwndwrapper.html#pywinauto.controls.hwndwrapper.HwndWrapper "pywinauto.controls.hwndwrapper.HwndWrapper") Class that wraps Windows Pager common control ### `GetPosition`(*\*args*, *\*\*kwargs*) ### `SetPosition`(*\*args*, *\*\*kwargs*) ### `friendlyclassname` *= 'Pager'* ### `get_position`() Return the current position of the pager ### `set_position`(*pos*) Set the current position of the pager ### `windowclasses` *= \['SysPager'\]* ## *class* `pywinauto.controls.common_controls.ProgressWrapper(element_info)` Bases: [`pywinauto.controls.hwndwrapper.HwndWrapper`](pywinauto.controls.hwndwrapper.html#pywinauto.controls.hwndwrapper.HwndWrapper "pywinauto.controls.hwndwrapper.HwndWrapper") Class that wraps Windows Progress common control ### `GetPosition`(*\*args*, *\*\*kwargs*) ### `GetState`(*\*args*, *\*\*kwargs*) ### `GetStep`(*\*args*, *\*\*kwargs*) ### `SetPosition`(*\*args*, *\*\*kwargs*) ### `StepIt`(*\*args*, *\*\*kwargs*) ### `friendlyclassname` *= 'Progress'* ### `get_position`() Return the current position of the progress bar ### `get_state`() Get the state of the progress bar State will be one of the following constants: * PBST\_NORMAL * PBST\_ERROR * PBST\_PAUSED ### `get_step`() Get the step size of the progress bar ### `has_title` *= False* ### `set_position`(*pos*) Set the current position of the progress bar ### `step_it`() Move the progress bar one step size forward ### `windowclasses` *= \['msctls\_progress', 'msctls\_progress32'\]* ## *class* `pywinauto.controls.common_controls.ReBarWrapper(hwnd)` Bases: [`pywinauto.controls.hwndwrapper.HwndWrapper`](pywinauto.controls.hwndwrapper.html#pywinauto.controls.hwndwrapper.HwndWrapper "pywinauto.controls.hwndwrapper.HwndWrapper") Class that wraps Windows ReBar common control ### `BandCount`(*\*args*, *\*\*kwargs*) ### `GetBand`(*\*args*, *\*\*kwargs*) ### `GetToolTipsControl`(*\*args*, *\*\*kwargs*) ### `band_count`() Return the number of bands in the control ### `friendlyclassname` *= 'ReBar'* ### `get_band`(*band\_index*) Get a band of the ReBar control ### `get_tool_tips_control`() Return the tooltip control associated with this control ### `texts`() ### `windowclasses` *= \['ReBarWindow32'\]* ### `writable_props` Extend default properties list. ## *class* `pywinauto.controls.common_controls.StatusBarWrapper(hwnd)` Bases: [`pywinauto.controls.hwndwrapper.HwndWrapper`](pywinauto.controls.hwndwrapper.html#pywinauto.controls.hwndwrapper.HwndWrapper "pywinauto.controls.hwndwrapper.HwndWrapper") Class that wraps Windows Status Bar common control ### `BorderWidths`(*\*args*, *\*\*kwargs*) ### `GetPartRect`(*\*args*, *\*\*kwargs*) ### `GetPartText`(*\*args*, *\*\*kwargs*) ### `PartCount`(*\*args*, *\*\*kwargs*) ### `PartRightEdges`(*\*args*, *\*\*kwargs*) ### `border_widths`() Return the border widths of the StatusBar A dictionary of the 3 available widths is returned: Horizontal - the horizontal width Vertical - The width above and below the status bar parts Inter - The width between parts of the status bar ### `client_rects`() Return the client rectangles for the control ### `friendlyclassname` *= 'StatusBar'* ### `get_part_rect`(*part\_index*) Return the rectangle of the part specified by part\_index ### `get_part_text`(*part\_index*) Return the text of the part specified by part\_index ### `part_count`() Return the number of parts ### `part_right_edges`() Return the widths of the parts ### `texts`() Return the texts for the control ### `windowclasses` *= \['msctls\_statusbar32', '.\*StatusBar', 'WindowsForms\\\\d\*\\\\.msctls\_statusbar32\\\\..\*'\]* ### `writable_props` Extend default properties list. ## *class* `pywinauto.controls.common_controls.``TabControlWrapper`(*hwnd*)[¶](#pywinauto.controls.common_controls.TabControlWrapper "Permalink to this definition") Bases: [`pywinauto.controls.hwndwrapper.HwndWrapper`](pywinauto.controls.hwndwrapper.html#pywinauto.controls.hwndwrapper.HwndWrapper "pywinauto.controls.hwndwrapper.HwndWrapper") Class that wraps Windows Tab common control `GetSelectedTab`(*\*args*, *\*\*kwargs*)[¶](#pywinauto.controls.common_controls.TabControlWrapper.GetSelectedTab "Permalink to this definition") `GetTabRect`(*\*args*, *\*\*kwargs*)[¶](#pywinauto.controls.common_controls.TabControlWrapper.GetTabRect "Permalink to this definition") `GetTabText`(*\*args*, *\*\*kwargs*)[¶](#pywinauto.controls.common_controls.TabControlWrapper.GetTabText "Permalink to this definition") `RowCount`(*\*args*, *\*\*kwargs*)[¶](#pywinauto.controls.common_controls.TabControlWrapper.RowCount "Permalink to this definition") `Select`(*\*args*, *\*\*kwargs*)[¶](#pywinauto.controls.common_controls.TabControlWrapper.Select "Permalink to this definition") `TabCount`(*\*args*, *\*\*kwargs*)[¶](#pywinauto.controls.common_controls.TabControlWrapper.TabCount "Permalink to this definition") `client_rects`()[¶](#pywinauto.controls.common_controls.TabControlWrapper.client_rects "Permalink to this definition") Return the client rectangles for the Tab Control `friendlyclassname` *= 'TabControl'*[¶](#pywinauto.controls.common_controls.TabControlWrapper.friendlyclassname "Permalink to this definition") `get_properties`()[¶](#pywinauto.controls.common_controls.TabControlWrapper.get_properties "Permalink to this definition") Return the properties of the TabControl as a Dictionary `get_selected_tab`()[¶](#pywinauto.controls.common_controls.TabControlWrapper.get_selected_tab "Permalink to this definition") Return the index of the selected tab `get_tab_rect`(*tab\_index*)[¶](#pywinauto.controls.common_controls.TabControlWrapper.get_tab_rect "Permalink to this definition") Return the rectangle to the tab specified by tab\_index `get_tab_text`(*tab\_index*)[¶](#pywinauto.controls.common_controls.TabControlWrapper.get_tab_text "Permalink to this definition") Return the text of the tab `row_count`()[¶](#pywinauto.controls.common_controls.TabControlWrapper.row_count "Permalink to this definition") Return the number of rows of tabs `select`(*tab*)[¶](#pywinauto.controls.common_controls.TabControlWrapper.select "Permalink to this definition") Select the specified tab on the tab control `tab_count`()[¶](#pywinauto.controls.common_controls.TabControlWrapper.tab_count "Permalink to this definition") Return the number of tabs `texts`()[¶](#pywinauto.controls.common_controls.TabControlWrapper.texts "Permalink to this definition") Return the texts of the Tab Control `windowclasses` *= \['SysTabControl32', 'WindowsForms\\\\d\*\\\\.SysTabControl32\\\\..\*'\]*[¶](#pywinauto.controls.common_controls.TabControlWrapper.windowclasses "Permalink to this definition") `writable_props`[¶](#pywinauto.controls.common_controls.TabControlWrapper.writable_props "Permalink to this definition") Extend default properties list. ## *class* `pywinauto.controls.common_controls.ToolTip(ctrl, tip_index)` Bases: `object` Class that Wraps a single tip from a ToolTip control ## *class* `pywinauto.controls.common_controls.ToolTipsWrapper(hwnd)` Bases: [`pywinauto.controls.hwndwrapper.HwndWrapper`](pywinauto.controls.hwndwrapper.html#pywinauto.controls.hwndwrapper.HwndWrapper "pywinauto.controls.hwndwrapper.HwndWrapper") Class that wraps Windows ToolTips common control (not fully implemented) `GetTip`(*\*args*, *\*\*kwargs*)[¶](#pywinauto.controls.common_controls.ToolTipsWrapper.GetTip "Permalink to this definition") `GetTipText`(*\*args*, *\*\*kwargs*)[¶](#pywinauto.controls.common_controls.ToolTipsWrapper.GetTipText "Permalink to this definition") `ToolCount`(*\*args*, *\*\*kwargs*)[¶](#pywinauto.controls.common_controls.ToolTipsWrapper.ToolCount "Permalink to this definition") `friendlyclassname` *= 'ToolTips'*[¶](#pywinauto.controls.common_controls.ToolTipsWrapper.friendlyclassname "Permalink to this definition") `get_tip`(*tip\_index*)[¶](#pywinauto.controls.common_controls.ToolTipsWrapper.get_tip "Permalink to this definition") Return the particular tooltip `get_tip_text`(*tip\_index*)[¶](#pywinauto.controls.common_controls.ToolTipsWrapper.get_tip_text "Permalink to this definition") Return the text of the tooltip `texts`()[¶](#pywinauto.controls.common_controls.ToolTipsWrapper.texts "Permalink to this definition") Return the text of all the tooltips `tool_count`()[¶](#pywinauto.controls.common_controls.ToolTipsWrapper.tool_count "Permalink to this definition") Return the number of tooltips `windowclasses` *= \['tooltips\_class32', '.\*ToolTip', '#32774', 'MS\_WINNOTE', 'VBBubble'\]*[¶](#pywinauto.controls.common_controls.ToolTipsWrapper.windowclasses "Permalink to this definition") ## *class* `pywinauto.controls.common_controls.ToolbarWrapper(hwnd)` Bases: [`pywinauto.controls.hwndwrapper.HwndWrapper`](pywinauto.controls.hwndwrapper.html#pywinauto.controls.hwndwrapper.HwndWrapper "pywinauto.controls.hwndwrapper.HwndWrapper") Class that wraps Windows Toolbar common control `Button`(*\*args*, *\*\*kwargs*)[¶](#pywinauto.controls.common_controls.ToolbarWrapper.Button "Permalink to this definition") `ButtonCount`(*\*args*, *\*\*kwargs*)[¶](#pywinauto.controls.common_controls.ToolbarWrapper.ButtonCount "Permalink to this definition") `CheckButton`(*\*args*, *\*\*kwargs*)[¶](#pywinauto.controls.common_controls.ToolbarWrapper.CheckButton "Permalink to this definition") `GetButton`(*\*args*, *\*\*kwargs*)[¶](#pywinauto.controls.common_controls.ToolbarWrapper.GetButton "Permalink to this definition") `GetButtonRect`(*\*args*, *\*\*kwargs*)[¶](#pywinauto.controls.common_controls.ToolbarWrapper.GetButtonRect "Permalink to this definition") `GetButtonStruct`(*\*args*, *\*\*kwargs*)[¶](#pywinauto.controls.common_controls.ToolbarWrapper.GetButtonStruct "Permalink to this definition") `GetToolTipsControl`(*\*args*, *\*\*kwargs*)[¶](#pywinauto.controls.common_controls.ToolbarWrapper.GetToolTipsControl "Permalink to this definition") `MenuBarClickInput`(*\*args*, *\*\*kwargs*)[¶](#pywinauto.controls.common_controls.ToolbarWrapper.MenuBarClickInput "Permalink to this definition") `PressButton`(*\*args*, *\*\*kwargs*)[¶](#pywinauto.controls.common_controls.ToolbarWrapper.PressButton "Permalink to this definition") `TipTexts`(*\*args*, *\*\*kwargs*)[¶](#pywinauto.controls.common_controls.ToolbarWrapper.TipTexts "Permalink to this definition") `button`(*button\_identifier*, *exact=True*, *by\_tooltip=False*)[¶](#pywinauto.controls.common_controls.ToolbarWrapper.button "Permalink to this definition") Return the button at index button\_index `button_count`()[¶](#pywinauto.controls.common_controls.ToolbarWrapper.button_count "Permalink to this definition") Return the number of buttons on the ToolBar `check_button`(*button\_identifier*, *make\_checked*, *exact=True*)[¶](#pywinauto.controls.common_controls.ToolbarWrapper.check_button "Permalink to this definition") Find where the button is and click it if it’s unchecked and vice versa `friendlyclassname` *= 'Toolbar'*[¶](#pywinauto.controls.common_controls.ToolbarWrapper.friendlyclassname "Permalink to this definition") `get_button`(*button\_index*)[¶](#pywinauto.controls.common_controls.ToolbarWrapper.get_button "Permalink to this definition") Return information on the Toolbar button `get_button_rect`(*button\_index*)[¶](#pywinauto.controls.common_controls.ToolbarWrapper.get_button_rect "Permalink to this definition") Get the rectangle of a button on the toolbar `get_button_struct`(*button\_index*)[¶](#pywinauto.controls.common_controls.ToolbarWrapper.get_button_struct "Permalink to this definition") Return TBBUTTON structure on the Toolbar button `get_tool_tips_control`()[¶](#pywinauto.controls.common_controls.ToolbarWrapper.get_tool_tips_control "Permalink to this definition") Return the tooltip control associated with this control `menu_bar_click_input`(*path*, *app*)[¶](#pywinauto.controls.common_controls.ToolbarWrapper.menu_bar_click_input "Permalink to this definition") Select menu bar items by path (experimental!) The path is specified by a list of items separated by ‘->’ each Item can be the zero based index of the item to return prefaced by # e.g. #1. Example: “#1 -> #0”, “#1->#0->#0” `press_button`(*button\_identifier*, *exact=True*)[¶](#pywinauto.controls.common_controls.ToolbarWrapper.press_button "Permalink to this definition") Find where the button is and click it `texts`()[¶](#pywinauto.controls.common_controls.ToolbarWrapper.texts "Permalink to this definition") Return the texts of the Toolbar `tip_texts`()[¶](#pywinauto.controls.common_controls.ToolbarWrapper.tip_texts "Permalink to this definition") Return the tip texts of the Toolbar (without window text) `windowclasses` *= \['ToolbarWindow32', 'TToolBar', 'WindowsForms\\\\d\*\\\\.ToolbarWindow32\\\\..\*', 'Afx:ToolBar:.\*'\]*[¶](#pywinauto.controls.common_controls.ToolbarWrapper.windowclasses "Permalink to this definition") `writable_props`[¶](#pywinauto.controls.common_controls.ToolbarWrapper.writable_props "Permalink to this definition") Extend default properties list. ## *class* `pywinauto.controls.common_controls.TrackbarWrapper(element_info)` Bases: [`pywinauto.controls.hwndwrapper.HwndWrapper`](pywinauto.controls.hwndwrapper.html#pywinauto.controls.hwndwrapper.HwndWrapper "pywinauto.controls.hwndwrapper.HwndWrapper") Class that wraps Windows Trackbar common control `friendlyclassname` *= 'Trackbar'*[¶](#pywinauto.controls.common_controls.TrackbarWrapper.friendlyclassname "Permalink to this definition") `get_channel_rect`()[¶](#pywinauto.controls.common_controls.TrackbarWrapper.get_channel_rect "Permalink to this definition") Get position of the bounding rectangle for a Trackbar `get_line_size`()[¶](#pywinauto.controls.common_controls.TrackbarWrapper.get_line_size "Permalink to this definition") Get the number of logical positions the trackbar’s slider `get_num_ticks`()[¶](#pywinauto.controls.common_controls.TrackbarWrapper.get_num_ticks "Permalink to this definition") Get trackbar num ticks `get_page_size`()[¶](#pywinauto.controls.common_controls.TrackbarWrapper.get_page_size "Permalink to this definition") Get the number of logical positions for the trackbar’s slider `get_position`()[¶](#pywinauto.controls.common_controls.TrackbarWrapper.get_position "Permalink to this definition") Get trackbar position `get_range_max`()[¶](#pywinauto.controls.common_controls.TrackbarWrapper.get_range_max "Permalink to this definition") Get max available trackbar value `get_range_min`()[¶](#pywinauto.controls.common_controls.TrackbarWrapper.get_range_min "Permalink to this definition") Get min available trackbar value `get_sel_end`()[¶](#pywinauto.controls.common_controls.TrackbarWrapper.get_sel_end "Permalink to this definition") Get end of selection `get_sel_start`()[¶](#pywinauto.controls.common_controls.TrackbarWrapper.get_sel_start "Permalink to this definition") Get start of selection `get_tooltips_control`()[¶](#pywinauto.controls.common_controls.TrackbarWrapper.get_tooltips_control "Permalink to this definition") Get trackbar tooltip `set_line_size`(*line\_size*)[¶](#pywinauto.controls.common_controls.TrackbarWrapper.set_line_size "Permalink to this definition") Set trackbar line size `set_page_size`(*page\_size*)[¶](#pywinauto.controls.common_controls.TrackbarWrapper.set_page_size "Permalink to this definition") Set trackbar page size `set_position`(*pos*)[¶](#pywinauto.controls.common_controls.TrackbarWrapper.set_position "Permalink to this definition") Set trackbar position `set_range_max`(*range\_max*)[¶](#pywinauto.controls.common_controls.TrackbarWrapper.set_range_max "Permalink to this definition") Set max available trackbar value `set_range_min`(*range\_min*)[¶](#pywinauto.controls.common_controls.TrackbarWrapper.set_range_min "Permalink to this definition") Set min available trackbar value `set_sel`(*sel\_start*, *sel\_end*)[¶](#pywinauto.controls.common_controls.TrackbarWrapper.set_sel "Permalink to this definition") Set start and end of selection `windowclasses` *= \['msctls\_trackbar'\]*[¶](#pywinauto.controls.common_controls.TrackbarWrapper.windowclasses "Permalink to this definition") ## *class* `pywinauto.controls.common_controls.TreeViewWrapper(hwnd)` Bases: [`pywinauto.controls.hwndwrapper.HwndWrapper`](pywinauto.controls.hwndwrapper.html#pywinauto.controls.hwndwrapper.HwndWrapper "pywinauto.controls.hwndwrapper.HwndWrapper") Class that wraps Windows TreeView common control `EnsureVisible`(*\*args*, *\*\*kwargs*)[¶](#pywinauto.controls.common_controls.TreeViewWrapper.EnsureVisible "Permalink to this definition") `GetItem`(*\*args*, *\*\*kwargs*)[¶](#pywinauto.controls.common_controls.TreeViewWrapper.GetItem "Permalink to this definition") `IsSelected`(*\*args*, *\*\*kwargs*)[¶](#pywinauto.controls.common_controls.TreeViewWrapper.IsSelected "Permalink to this definition") `Item`(*\*args*, *\*\*kwargs*)[¶](#pywinauto.controls.common_controls.TreeViewWrapper.Item "Permalink to this definition") `ItemCount`(*\*args*, *\*\*kwargs*)[¶](#pywinauto.controls.common_controls.TreeViewWrapper.ItemCount "Permalink to this definition") `PrintItems`(*\*args*, *\*\*kwargs*)[¶](#pywinauto.controls.common_controls.TreeViewWrapper.PrintItems "Permalink to this definition") `Root`(*\*args*, *\*\*kwargs*)[¶](#pywinauto.controls.common_controls.TreeViewWrapper.Root "Permalink to this definition") `Roots`(*\*args*, *\*\*kwargs*)[¶](#pywinauto.controls.common_controls.TreeViewWrapper.Roots "Permalink to this definition") `Select`(*\*args*, *\*\*kwargs*)[¶](#pywinauto.controls.common_controls.TreeViewWrapper.Select "Permalink to this definition") `ensure_visible`(*path*)[¶](#pywinauto.controls.common_controls.TreeViewWrapper.ensure_visible "Permalink to this definition") Make sure that the TreeView item is visible `friendlyclassname` *= 'TreeView'*[¶](#pywinauto.controls.common_controls.TreeViewWrapper.friendlyclassname "Permalink to this definition") `get_item`(*path*, *exact=False*)[¶](#pywinauto.controls.common_controls.TreeViewWrapper.get_item "Permalink to this definition") 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 the index which root to select. `get_properties`()[¶](#pywinauto.controls.common_controls.TreeViewWrapper.get_properties "Permalink to this definition") Get the properties for the control as a dictionary `is_selected`(*path*)[¶](#pywinauto.controls.common_controls.TreeViewWrapper.is_selected "Permalink to this definition") Return True if the item is selected `item`(*path*, *exact=False*)[¶](#pywinauto.controls.common_controls.TreeViewWrapper.item "Permalink to this definition") 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 the index which root to select. `item_count`()[¶](#pywinauto.controls.common_controls.TreeViewWrapper.item_count "Permalink to this definition") Return the count of the items in the treeview `print_items`()[¶](#pywinauto.controls.common_controls.TreeViewWrapper.print_items "Permalink to this definition") Print all items with line indents `roots`()[¶](#pywinauto.controls.common_controls.TreeViewWrapper.roots "Permalink to this definition") Get root items of the control `select`(*path*)[¶](#pywinauto.controls.common_controls.TreeViewWrapper.select "Permalink to this definition") Select the treeview item `texts`()[¶](#pywinauto.controls.common_controls.TreeViewWrapper.texts "Permalink to this definition") Return all the text for the tree view `tree_root`()[¶](#pywinauto.controls.common_controls.TreeViewWrapper.tree_root "Permalink to this definition") Return the root element of the tree view `windowclasses` *= \['SysTreeView32', 'WindowsForms\\\\d\*\\\\.SysTreeView32\\\\..\*', 'TTreeView', 'TreeList.TreeListCtrl'\]*[¶](#pywinauto.controls.common_controls.TreeViewWrapper.windowclasses "Permalink to this definition") `writable_props`[¶](#pywinauto.controls.common_controls.TreeViewWrapper.writable_props "Permalink to this definition") Extend default properties list. ## *class* `pywinauto.controls.common_controls.UpDownWrapper(hwnd)` Bases: [`pywinauto.controls.hwndwrapper.HwndWrapper`](pywinauto.controls.hwndwrapper.html#pywinauto.controls.hwndwrapper.HwndWrapper "pywinauto.controls.hwndwrapper.HwndWrapper") Class that wraps Windows UpDown common control `Decrement`(*\*args*, *\*\*kwargs*)[¶](#pywinauto.controls.common_controls.UpDownWrapper.Decrement "Permalink to this definition") `GetBase`(*\*args*, *\*\*kwargs*)[¶](#pywinauto.controls.common_controls.UpDownWrapper.GetBase "Permalink to this definition") `GetBuddyControl`(*\*args*, *\*\*kwargs*)[¶](#pywinauto.controls.common_controls.UpDownWrapper.GetBuddyControl "Permalink to this definition") `GetRange`(*\*args*, *\*\*kwargs*)[¶](#pywinauto.controls.common_controls.UpDownWrapper.GetRange "Permalink to this definition") `GetValue`(*\*args*, *\*\*kwargs*)[¶](#pywinauto.controls.common_controls.UpDownWrapper.GetValue "Permalink to this definition") `Increment`(*\*args*, *\*\*kwargs*)[¶](#pywinauto.controls.common_controls.UpDownWrapper.Increment "Permalink to this definition") `SetBase`(*\*args*, *\*\*kwargs*)[¶](#pywinauto.controls.common_controls.UpDownWrapper.SetBase "Permalink to this definition") `SetValue`(*\*args*, *\*\*kwargs*)[¶](#pywinauto.controls.common_controls.UpDownWrapper.SetValue "Permalink to this definition") `decrement`()[¶](#pywinauto.controls.common_controls.UpDownWrapper.decrement "Permalink to this definition") Decrement the number in the UpDown control by one `friendlyclassname` *= 'UpDown'*[¶](#pywinauto.controls.common_controls.UpDownWrapper.friendlyclassname "Permalink to this definition") `get_base`()[¶](#pywinauto.controls.common_controls.UpDownWrapper.get_base "Permalink to this definition") Get the base the UpDown control (either 10 or 16) `get_buddy_control`()[¶](#pywinauto.controls.common_controls.UpDownWrapper.get_buddy_control "Permalink to this definition") Get the buddy control of the updown control `get_range`()[¶](#pywinauto.controls.common_controls.UpDownWrapper.get_range "Permalink to this definition") Return the lower, upper range of the up down control `get_value`()[¶](#pywinauto.controls.common_controls.UpDownWrapper.get_value "Permalink to this definition") Get the current value of the UpDown control `increment`()[¶](#pywinauto.controls.common_controls.UpDownWrapper.increment "Permalink to this definition") Increment the number in the UpDown control by one `set_base`(*base\_value*)[¶](#pywinauto.controls.common_controls.UpDownWrapper.set_base "Permalink to this definition") Get the base the UpDown control (either 10 or 16) `set_value`(*new\_pos*)[¶](#pywinauto.controls.common_controls.UpDownWrapper.set_value "Permalink to this definition") Set the value of the of the UpDown control to some integer value `windowclasses` *= \['msctls\_updown32', 'msctls\_updown'\]*[¶](#pywinauto.controls.common_controls.UpDownWrapper.windowclasses "Permalink to this definition")