diff --git a/tests/system/suite_editors/tst_modify_readonly/test.py b/tests/system/suite_editors/tst_modify_readonly/test.py index c5de75a8536..389ee0574a3 100644 --- a/tests/system/suite_editors/tst_modify_readonly/test.py +++ b/tests/system/suite_editors/tst_modify_readonly/test.py @@ -82,10 +82,12 @@ def testSaveChangesAndMakeWritable(modifiedFiles, readOnlyFiles): clickButton(waitForObject("{text='Make Writable' type='QPushButton' unnamed='1' " "visible='1' window=%s}" % readOnlyMBoxStr)) try: - waitForObject(cannotResetStr, 3000) - # should not be possible - test.fail("Could not reset file '%s' to writable state." % currentFile) - clickButton("{text='OK' type='QPushButton' window=%s}" % cannotResetStr) + # avoid an AUT crash that happens frequently on the testing machines + if currentApplicationContext().isRunning: + waitForObject(cannotResetStr, 3000) + # should not be possible + test.fail("Could not reset file '%s' to writable state." % currentFile) + clickButton("{text='OK' type='QPushButton' window=%s}" % cannotResetStr) except: if isWritable(currentFile): test.passes("File '%s' resetted to writable state and saved." % currentFile)