pyWinAuto: c:\.projects\py_pywinauto\pywinauto\tests\allcontrols.py

0001# GUI Application automation and testing library
0002# Copyright (C) 2006 Mark Mc Mahon
0003#
0004# This library is free software; you can redistribute it and/or
0005# modify it under the terms of the GNU Lesser General Public License
0006# as published by the Free Software Foundation; either version 2.1
0007# of the License, or (at your option) any later version.
0008#
0009# This library is distributed in the hope that it will be useful,
0010# but WITHOUT ANY WARRANTY; without even the implied warranty of
0011# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
0012# See the GNU Lesser General Public License for more details.
0013#
0014# You should have received a copy of the GNU Lesser General Public
0015# License along with this library; if not, write to the
0016#    Free Software Foundation, Inc.,
0017#    59 Temple Place,
0018#    Suite 330,
0019#    Boston, MA 02111-1307 USA
0020
0021"""Get All Controls Test
0022
0023**What is checked**
0024This test does no actual testing  it just returns each control.
0025
0026**How is it checked**
0027A loop over all the controls in the dialog is made and each control added to
0028the list of bugs
0029
0030**When is a bug reported**
0031For each control.
0032
0033**Bug Extra Information**
0034There is no extra information associated with this bug type
0035
0036**Is Reference dialog needed**
0037No,but if available the reference control will be returned with the localised
0038control.
0039
0040**False positive bug reports**
0041Not possible
0042
0043**Test Identifier**
0044The identifier for this test/bug is "AllControls"
0045"""
0046__revision__ = "$Revision: 189 $"
0047
0048
0049testname = "AllControls"
0050
0051#-----------------------------------------------------------------------------
0052def AllControlsTest(windows):
0053    "Returns just one bug for each control"
0054
0055    bugs = []
0056    for win in windows:
0057        bugs.append((
0058            [win,],
0059            {},
0060            testname,
0061            0
0062        ))
0063
0064
0065    return bugs