Squish: Avoid menu problems with Squish 6.0.0

Change-Id: I43219d36f07e2b5636f84f891f94220148f4dd7f
Reviewed-by: Christian Stenger <christian.stenger@theqtcompany.com>
This commit is contained in:
Robert Loehning
2015-09-08 12:10:48 +02:00
parent 974fe9f8c3
commit 506c0685a3
3 changed files with 3 additions and 0 deletions

View File

@@ -345,6 +345,7 @@ def validateSearchResult(expectedCount):
# this function invokes context menu and command from it
def invokeContextMenuItem(editorArea, command1, command2 = None):
ctxtMenu = openContextMenuOnTextCursorPosition(editorArea)
snooze(1)
if platform.system() == 'Darwin':
activateItem(ctxtMenu, command1)
else:

View File

@@ -211,6 +211,7 @@ def invokeMenuItem(menu, item, *subItems):
nativeType("<Command+q>")
return
menuObject = waitForObjectItem(":Qt Creator.QtCreator.MenuBar_QMenuBar", menu)
snooze(1)
waitFor("menuObject.visible", 1000)
activateItem(menuObject)
itemObject = waitForObjectItem(objectMap.realName(menuObject), item)

View File

@@ -48,6 +48,7 @@ def main():
for con in connections:
selectFromLocator("mainwindow.ui")
openContextMenu(waitForObject(con[0]), 5, 5, 0)
snooze(1)
# hack for Squish 5/Qt5.2 problems of handling menus on Mac - remove asap
if platform.system() == 'Darwin':
waitFor("macHackActivateContextMenuItem('Go to slot...', con[0])", 6000)