pyWinAuto: c:\.projects\py_pywinauto\pywinauto\tests\comboboxdroppedheight.py
0001
0002
0003
0004
0005
0006
0007
0008
0009
0010
0011
0012
0013
0014
0015
0016
0017
0018
0019
0020
0021"""ComboBox dropped height Test
0022
0023**What is checked**
0024It is ensured that the height of the list displayed when the combobox is
0025dropped down is not less than the height of the reference.
0026
0027**How is it checked**
0028The value for the dropped rectangle can be retrieved from windows. The height
0029of this rectangle is calculated and compared against the reference height.
0030
0031**When is a bug reported**
0032If the height of the dropped rectangle for the combobox being checked is less
0033than the height of the reference one then a bug is reported.
0034
0035**Bug Extra Information**
0036There is no extra information associated with this bug type
0037
0038**Is Reference dialog needed**
0039The reference dialog is necessary for this test.
0040
0041**False positive bug reports**
0042No false bugs should be reported. If the font of the localised control has a
0043smaller height than the reference then it is possible that the dropped
0044rectangle could be of a different size.
0045
0046**Test Identifier**
0047The identifier for this test/bug is "ComboBoxDroppedHeight"
0048"""
0049__revision__ = "$Revision: 276 $"
0050
0051testname = "ComboBoxDroppedHeight"
0052
0053def ComboBoxDroppedHeightTest(windows):
0054 "Check if each combobox height is the same as the reference"
0055 bugs = []
0056 for win in windows:
0057 if not win.ref:
0058 continue
0059
0060 if win.Class() != "ComboBox" or win.ref.Class() != "ComboBox":
0061 continue
0062
0063 if win.DroppedRect().height() != win.ref.DroppedRect().height():
0064
0065 bugs.append((
0066 [win, ],
0067 {},
0068 testname,
0069 0,)
0070 )
0071
0072 return bugs