diff --git a/tests/system/shared/utils.py b/tests/system/shared/utils.py index 97f1d7c5d42..d75d683dfb8 100644 --- a/tests/system/shared/utils.py +++ b/tests/system/shared/utils.py @@ -176,10 +176,17 @@ def invokeMenuItem(menu, item, *subItems): waitForObject(":Qt Creator.QtCreator.MenuBar_QMenuBar", 2000) except: nativeMouseClick(waitForObject(":Qt Creator_Core::Internal::MainWindow", 1000), 20, 20, 0, Qt.LeftButton) - # HACK to avoid squish crash using Qt5.2 on Squish 5.0.1 - remove asap + # HACK as Squish fails to provide a proper way to access the system menu if platform.system() == "Darwin": if menu == "Tools" and item == "Options...": - nativeType("") + #nativeType("") + # the following is a pure HACK because using the default key sequence seems to be broken + # when running from inside Squish + menuBar = waitForObject(":Qt Creator.QtCreator.MenuBar_QMenuBar", 500) + nativeMouseClick(menuBar, 75, 5, 0, Qt.LeftButton) + for _ in range(3): + nativeType("") + nativeType("") return if menu == "File" and item == "Exit": nativeType("")