Squish: Make selectFromFileDialog() more stable

Change-Id: Ia454bc3174fa48602e181f4848944c0299a95517
Reviewed-by: Christian Stenger <christian.stenger@digia.com>
This commit is contained in:
Robert Loehning
2013-03-25 13:52:29 +01:00
parent c6a8f13811
commit 0bb911f640

View File

@@ -242,10 +242,11 @@ def selectFromFileDialog(fileName, waitForFile=False):
waitForObject("{name='QFileDialog' type='QFileDialog' visible='1'}")
pathLine = waitForObject("{name='fileNameEdit' type='QLineEdit' visible='1'}")
replaceEditorContent(pathLine, pName)
clickButton(findObject("{text='Open' type='QPushButton'}"))
clickButton(waitForObject("{text='Open' type='QPushButton'}"))
waitFor("str(pathLine.text)==''")
snooze(1)
replaceEditorContent(pathLine, fName)
clickButton(findObject("{text='Open' type='QPushButton'}"))
clickButton(waitForObject("{text='Open' type='QPushButton'}"))
if waitForFile:
fileCombo = waitForObject(":Qt Creator_FilenameQComboBox")
if not waitFor("str(fileCombo.currentText) in fileName", 5000):