forked from qt-creator/qt-creator
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: Robert Löhning <robert.loehning@nokia.com> Reviewed-by: Christian Stenger <christian.stenger@nokia.com>
This commit is contained in:
committed by
Christian Stenger
parent
24b4b0cfca
commit
0286148a14
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user