aboutsummaryrefslogtreecommitdiffstats
path: root/tests/system/suite_QMLS/tst_QMLS07/test.py
diff options
context:
space:
mode:
Diffstat (limited to 'tests/system/suite_QMLS/tst_QMLS07/test.py')
-rw-r--r--tests/system/suite_QMLS/tst_QMLS07/test.py6
1 files changed, 5 insertions, 1 deletions
diff --git a/tests/system/suite_QMLS/tst_QMLS07/test.py b/tests/system/suite_QMLS/tst_QMLS07/test.py
index f3b118f841..5f942cfa44 100644
--- a/tests/system/suite_QMLS/tst_QMLS07/test.py
+++ b/tests/system/suite_QMLS/tst_QMLS07/test.py
@@ -40,7 +40,11 @@ def main():
invokeMenuItem("File", "Save All")
# invoke Refactoring - Add a message suppression comment.
numLinesExpected = len(str(editorArea.plainText).splitlines()) + 1
- invokeContextMenuItem(editorArea, "Refactoring", "Add a Comment to Suppress This Message")
+ try:
+ invokeContextMenuItem(editorArea, "Refactoring", "Add a Comment to Suppress This Message")
+ except:
+ # If menu item is disabled it needs to reopen the menu for updating
+ invokeContextMenuItem(editorArea, "Refactoring", "Add a Comment to Suppress This Message")
# wait until refactoring ended
waitFor("len(str(editorArea.plainText).splitlines()) >= numLinesExpected", 5000)
# verify if refactoring was properly applied