多应用+插件架构,代码干净,二开方便,首家独创一键云编译技术,文档视频完善,免费商用码云13.8K 广告
# pywinauto.tests.overlapping[¶](https://pywinauto.readthedocs.io/en/latest/code/pywinauto.tests.overlapping.html#pywinauto-tests-overlapping "Permalink to this headline") > Overlapping Test > > **What is checked** The overlapping test checks for controls that occupy the same space as some other control in the dialog. > > > * If the reference controls are available check for each pair of controls: > > * If controls are exactly the same size and position in reference then make sure that they are also in the localised. > > * If a reference control is wholly contained in another make sure that the same happens for the controls being tested. > > * If the reference controls are not available only the following check can be done > > * If controls are overlapped in localised report a bug (if reference is available it is used just to say if this overlapping happens in reference also) > > **How is it checked** Various tests are performed on each pair of controls to see if any of the above conditions are met. The most specific tests that can be performed are done 1st so that the bugs reported are as specific as possible. I.e. we report that 2 controls are not exactly overlapped when they should be rather than jut reporting that they are overlapped which contains less information. > > **When is a bug reported** A bug is reported when: > > > * controls are overlapped (but not contained wholly, and not exactly overlapped) > > * reference controls are exactly overlapped but they are not in tested dialog > > * one reference control is wholly contained in another but not in tested dialog > > **Bug Extra Information** This test produces 3 different types of bug: BugType: “Overlapping” Name Description OverlappedRect , rectangle > > **BugType - “NotContainedOverlap”** There is no extra information associated with this bug type > > **BugType - “NotExactOverlap”** There is no extra information associated with this bug type > > **Is Reference dialog needed** For checking whether controls should be exactly overlapped and whether they should be wholly contained the reference controls are necessary. If the reference controls are not available then only simple overlapping of controls will be checked. > > **False positive bug reports** If there are controls in the dialog that are not visible or are moved dynamically it may cause bugs to be reported that do not need to be logged. If necessary filter out bugs with hidden controls. > > **Test Identifier** The identifier for this test is “Overlapping” > > *class* `pywinauto.tests.overlapping.``OptRect`[¶](https://pywinauto.readthedocs.io/en/latest/code/pywinauto.tests.overlapping.html#pywinauto.tests.overlapping.OptRect "Permalink to this definition") > > `pywinauto.tests.overlapping.``OverlappingTest`(*windows*)[¶](https://pywinauto.readthedocs.io/en/latest/code/pywinauto.tests.overlapping.html#pywinauto.tests.overlapping.OverlappingTest "Permalink to this definition") > > Return the repeated hotkey errors