From b044f25c2b377fcbae623be3e8b2e3fe4767297f Mon Sep 17 00:00:00 2001 From: Robert Loehning Date: Wed, 11 Sep 2013 23:17:28 +0200 Subject: [PATCH] Squish: Prevent possible timing issue Change-Id: Ia13ae58792c73453b89b8288c5807448f7438c37 Reviewed-by: Christian Stenger --- tests/system/shared/project.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/tests/system/shared/project.py b/tests/system/shared/project.py index 60e290c1579..60f09d0679a 100644 --- a/tests/system/shared/project.py +++ b/tests/system/shared/project.py @@ -612,8 +612,9 @@ def addCPlusPlusFileToCurrentProject(name, template, forceOverwrite=False): "visible='1' window=%s}" % window) replaceEditorContent(lineEdit, name) clickButton(waitForObject(":Next_QPushButton")) + fileExistedBefore = os.path.exists(os.path.join(basePath, name)) __createProjectHandleLastPage__() - if (os.path.exists(os.path.join(basePath, name))): + if (fileExistedBefore): overwriteDialog = "{type='Core::Internal::PromptOverwriteDialog' unnamed='1' visible='1'}" waitForObject(overwriteDialog) if forceOverwrite: