diff --git a/tests/system/shared/utils.py b/tests/system/shared/utils.py index 97f1d7c5d4296bc111e21a85e96605751e95d63c..d75d683dfb82933a57581cb30b3ba0039efc8f7c 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("<Command+,>") + #nativeType("<Command+,>") + # 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("<Down>") + nativeType("<Return>") return if menu == "File" and item == "Exit": nativeType("<Command+q>")