Commit 0286148a authored by Robert Loehning's avatar Robert Loehning Committed by Christian Stenger
Browse files

Squish: Fix using file dialogs



Because of the proposals the file dialog makes
when typing into the line edit selectFromFileDialog()
seems to fail sometimes (in Jenkins and on my machine).

Change-Id: Iea098016075e9a8471bd85f585e473fa8dd3bf6a
Reviewed-by: default avatarRobert Löhning <robert.loehning@nokia.com>
Reviewed-by: default avatarChristian Stenger <christian.stenger@nokia.com>
parent 24b4b0cf
......@@ -199,9 +199,14 @@ def selectFromFileDialog(fileName):
snooze(2)
nativeType("<Return>")
else:
fName = os.path.basename(os.path.abspath(fileName))
pName = os.path.dirname(os.path.abspath(fileName))
waitForObject("{name='QFileDialog' type='QFileDialog' visible='1'}")
pathLine = waitForObject("{name='fileNameEdit' type='QLineEdit' visible='1'}")
replaceEditorContent(pathLine, os.path.abspath(fileName))
replaceEditorContent(pathLine, pName)
clickButton(findObject("{text='Open' type='QPushButton'}"))
waitFor("str(pathLine.text)==''")
replaceEditorContent(pathLine, fName)
clickButton(findObject("{text='Open' type='QPushButton'}"))
# add qt.qch from SDK path
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment