Skip to content

Commit

Permalink
Enrich window classes to detect some controls that behave like standa…
Browse files Browse the repository at this point in the history
…rd ones.
  • Loading branch information
vasily-v-ryabov committed Nov 1, 2015
1 parent b3677bc commit bb23ff6
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 13 deletions.
3 changes: 1 addition & 2 deletions pywinauto/controls/common_controls.py
Original file line number Diff line number Diff line change
Expand Up @@ -1688,8 +1688,7 @@ class StatusBarWrapper(HwndWrapper.HwndWrapper):
friendlyclassname = "StatusBar"
windowclasses = [
"msctls_statusbar32",
"HSStatusBar",
"TStatusBar",
".*StatusBar",
r"WindowsForms\d*\.msctls_statusbar32\..*"]

#----------------------------------------------------------------
Expand Down
18 changes: 7 additions & 11 deletions pywinauto/controls/win32_controls.py
Original file line number Diff line number Diff line change
Expand Up @@ -50,12 +50,9 @@ class ButtonWrapper(HwndWrapper.HwndWrapper):
friendlyclassname = "Button"
windowclasses = [
"Button",
".*Button",
r"WindowsForms\d*\.BUTTON\..*",
"TButton",
"ThunderCommandButton",
"ThunderOptionButton",
"ThunderCheckBox",
"TCheckBox"]
".*CheckBox", ]
can_be_label = True

#-----------------------------------------------------------
Expand Down Expand Up @@ -255,7 +252,7 @@ class ComboBoxWrapper(HwndWrapper.HwndWrapper):
windowclasses = [
"ComboBox",
"WindowsForms\d*\.COMBOBOX\..*",
"TComboBox"]
".*ComboBox", ]
has_title = False

#-----------------------------------------------------------
Expand Down Expand Up @@ -408,9 +405,7 @@ class ListBoxWrapper(HwndWrapper.HwndWrapper):
windowclasses = [
"ListBox",
r"WindowsForms\d*\.LISTBOX\..*",
"ThunderListBox",
"ThunderFileListBox",
"TListBox",]
".*ListBox", ]
has_title = False

#-----------------------------------------------------------
Expand Down Expand Up @@ -603,7 +598,7 @@ class EditWrapper(HwndWrapper.HwndWrapper):
friendlyclassname = "Edit"
windowclasses = [
"Edit",
"TEdit",
".*Edit",
"TMemo",
r"WindowsForms\d*\.EDIT\..*",
"ThunderTextBox",
Expand Down Expand Up @@ -797,7 +792,8 @@ class StaticWrapper(HwndWrapper.HwndWrapper):
windowclasses = [
"Static",
r"WindowsForms\d*\.STATIC\..*",
"TPanel"]
"TPanel",
".*StaticText"]
can_be_label = True

def __init__(self, hwnd):
Expand Down

0 comments on commit bb23ff6

Please sign in to comment.