diff --git a/tests/system/shared/debugger.py b/tests/system/shared/debugger.py
index 301ff108de3c0c8f3b6ad745c599b796cb778749..41f7bdc598bd2e6ef06e27f393637c7fba764b66 100644
--- a/tests/system/shared/debugger.py
+++ b/tests/system/shared/debugger.py
@@ -246,7 +246,7 @@ def verifyBreakPoint(bpToVerify):
             textPos = editor.textCursor().position()
             line = str(editor.plainText)[:textPos].count("\n") + 1
             windowTitle = str(waitForObject(":Qt Creator_Core::Internal::MainWindow").windowTitle)
-            test.verify(os.path.basename(fileName) in windowTitle,
+            test.verify(windowTitle.startswith(os.path.basename(fileName) + " "),
                         "Verify that Creator's window title changed according to current file")
             return test.compare(line, bpToVerify.values()[0],
                                 "Compare hit breakpoint to expected line number in %s" % fileName)
diff --git a/tests/system/shared/editor_utils.py b/tests/system/shared/editor_utils.py
index 51b2fdf4d91fe6efd102dcd37d675d6d9e73d175..72a844fec3703c86f8b756431daddc20bbf3ca72 100644
--- a/tests/system/shared/editor_utils.py
+++ b/tests/system/shared/editor_utils.py
@@ -267,7 +267,7 @@ def getEditorForFileSuffix(curFile, treeViewSyntax=False):
     if treeViewSyntax:
         expected = simpleFileName(curFile)
     mainWindow = waitForObject(":Qt Creator_Core::Internal::MainWindow")
-    if not waitFor("expected in str(mainWindow.windowTitle)", 5000):
+    if not waitFor("str(mainWindow.windowTitle).startswith(expected + ' ')", 5000):
         test.fatal("Window title (%s) did not switch to expected file (%s)."
                    % (str(mainWindow.windowTitle), expected))
     try:
@@ -387,7 +387,7 @@ def openDocument(treeElement):
             doubleClickItem(navigator, treeElement, 5, 5, 0, Qt.LeftButton)
             mainWindow = waitForObject(":Qt Creator_Core::Internal::MainWindow")
             expected = str(item.text).split("/")[-1]
-            if waitFor("expected in str(mainWindow.windowTitle)", 5000):
+            if waitFor("str(mainWindow.windowTitle).startswith(expected + ' ')", 5000):
                 return True
         test.log("Expected file (%s) was not being opened in openDocument()" % expected)
         return False
diff --git a/tests/system/suite_editors/tst_basic_cpp_support/test.py b/tests/system/suite_editors/tst_basic_cpp_support/test.py
index d27c8ed6fb407759e07f99f431eddc6e49f1a788..253e27aec68bf24cda7b24dfc9aefa9a0ce4465a 100644
--- a/tests/system/suite_editors/tst_basic_cpp_support/test.py
+++ b/tests/system/suite_editors/tst_basic_cpp_support/test.py
@@ -82,7 +82,7 @@ def main():
 #    Creator should show the declaration of the function again.
     selectFromLocator("dummy.cpp")
     mainWin = findObject(":Qt Creator_Core::Internal::MainWindow")
-    if not waitFor("'dummy.cpp ' in str(mainWin.windowTitle) and ' @ cplusplus-tools ' in str(mainWin.windowTitle)", 5000):
+    if not waitFor("str(mainWin.windowTitle).startswith('dummy.cpp ') and ' @ cplusplus-tools ' in str(mainWin.windowTitle)", 5000):
         test.warning("Opening dummy.cpp seems to have failed")
     # Reset cursor to the start of the document
     if platform.system() == 'Darwin':
diff --git a/tests/system/suite_general/tst_new_class/test.py b/tests/system/suite_general/tst_new_class/test.py
index 7f1f056908b0be5083736b57b925d680cb4d76a8..3d3b8d6ec9a2406d12a8492d004f68c564bb0af1 100644
--- a/tests/system/suite_general/tst_new_class/test.py
+++ b/tests/system/suite_general/tst_new_class/test.py
@@ -39,7 +39,7 @@ def main():
                      expectedHeaderName=headerFileName)
 
     mainWindow = waitForObject(":Qt Creator_Core::Internal::MainWindow")
-    if test.verify(waitFor("sourceFileName in str(mainWindow.windowTitle)", 1000),
+    if test.verify(waitFor("str(mainWindow.windowTitle).startswith(sourceFileName + ' ')", 1000),
                    "Source file was opened on time?"):
         editor = waitForObject(":Qt Creator_CppEditor::Internal::CPPEditorWidget")
         editorText = str(editor.plainText)
@@ -52,7 +52,7 @@ def main():
         type(editor, "<Return>")
         invokeMenuItem("File", "Save All")
         clickButton(waitForObject(":Qt Creator.CloseDoc_QToolButton"))
-    if test.verify(waitFor("headerFileName in str(mainWindow.windowTitle)", 2000),
+    if test.verify(waitFor("str(mainWindow.windowTitle).startswith(headerFileName + ' ')", 2000),
                    "Header file was shown after closing source?"):
         editor = waitForObject(":Qt Creator_CppEditor::Internal::CPPEditorWidget")
         editorText = str(editor.plainText)
diff --git a/tests/system/suite_general/tst_session_handling/test.py b/tests/system/suite_general/tst_session_handling/test.py
index 4e626232af08916460565d4a4395ef79a34ec93f..754f42bd1e0b10c737d2fc81311a25b945d1f569 100644
--- a/tests/system/suite_general/tst_session_handling/test.py
+++ b/tests/system/suite_general/tst_session_handling/test.py
@@ -58,7 +58,7 @@ def main():
                 "Verifying window title contains created session name.")
     checkNavigator(52, "Verifying whether all projects have been re-opened.")
     checkOpenDocuments(2, "Verifying whether 2 files have been re-opened.")
-    if test.verify("main.cpp" in str(mainWindow.windowTitle),
+    if test.verify(str(mainWindow.windowTitle).startswith("main.cpp "),
                    "Verifying whether utility.h has been opened."):
         current = str(waitForObject(":Qt Creator_CppEditor::Internal::CPPEditorWidget").plainText)
         test.verify(originalText == current, "Verifying that same file has been opened.")