diff options
author | Eike Ziller <eike.ziller@qt.io> | 2019-10-04 12:19:32 +0200 |
---|---|---|
committer | Eike Ziller <eike.ziller@qt.io> | 2019-10-04 12:19:32 +0200 |
commit | 4f0ffcecbe9e64741fb8528ecb07c923a0cfa0cc (patch) | |
tree | 4a04018786ded1ccd6bfa72a902da95adc768cea /tests/system/shared | |
parent | e8d5e6c8083e0a5f4fd52687b45b05e53c72266c (diff) | |
parent | ea829fa6d51b46d1c2f06d14150c0948ffd044d5 (diff) |
Merge remote-tracking branch 'origin/4.10' into 4.11
Conflicts:
src/plugins/projectexplorer/projectnodes.h
Change-Id: Ibd255105a01c53a1f81a1ec7b30495dfef1877a9
Diffstat (limited to 'tests/system/shared')
-rw-r--r-- | tests/system/shared/utils.py | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/tests/system/shared/utils.py b/tests/system/shared/utils.py index e8bc1425a7..ef46aca7b2 100644 --- a/tests/system/shared/utils.py +++ b/tests/system/shared/utils.py @@ -235,6 +235,11 @@ def getOutputFromCmdline(cmdline, environment=None, acceptedError=0): return e.output def selectFromFileDialog(fileName, waitForFile=False, ignoreFinalSnooze=False): + def __closePopupIfNecessary__(): + if not isNull(QApplication.activePopupWidget()): + test.log("Closing active popup widget") + QApplication.activePopupWidget().close() + if platform.system() == "Darwin": snooze(1) nativeType("<Command+Shift+g>") @@ -252,12 +257,13 @@ def selectFromFileDialog(fileName, waitForFile=False, ignoreFinalSnooze=False): try: waitForObject("{name='QFileDialog' type='QFileDialog' visible='1'}", 5000) pathLine = waitForObject("{name='fileNameEdit' type='QLineEdit' visible='1'}") - snooze(1) replaceEditorContent(pathLine, pName) + snooze(1) clickButton(waitForObject("{text='Open' type='QPushButton'}")) waitFor("str(pathLine.text)==''") - snooze(1) replaceEditorContent(pathLine, fName) + snooze(1) + __closePopupIfNecessary__() clickButton(waitForObject("{text='Open' type='QPushButton'}")) except: nativeType("<Ctrl+a>") |