Squish: Fixing Mac

* removed unused object
* refactored invokeMenuItem()
* always lookup cppwindow to avoid failing type()
* use objects stored inside objects.map to avoid LookupError
* reverted raising timeout to 60s
* added workaround for missing focus on Mac right after
  startApplication()
* removed the need to have a shell-script called 'qtcreator'
  (make sure to add 'Qt Creator.app' as AUT now)

Change-Id: I21511d810deedf31dfb19b896edd21b79e73b755
Reviewed-by: Bill King <bill.king@nokia.com>
Reviewed-by: Robert Löhning <robert.loehning@nokia.com>
This commit is contained in:
Christian Stenger
2012-02-24 15:21:42 +01:00
committed by Robert Löhning
parent 6e72f24f00
commit 25decf2052
6 changed files with 30 additions and 12 deletions
+5 -2
View File
@@ -169,12 +169,15 @@ def cleanUpUserFiles(pathsToProFiles=None):
return doneWithoutErrors
def invokeMenuItem(menu, item, subItem = None):
menuObject = waitForObjectItem("{type='QMenuBar' visible='true'}", menu)
menuObject = waitForObjectItem(":Qt Creator.QtCreator.MenuBar_QMenuBar", menu)
activateItem(menuObject)
itemObject = waitForObjectItem(objectMap.realName(menuObject), item)
waitFor("menuObject.visible", 1000)
activateItem(itemObject)
if subItem != None:
activateItem(waitForObjectItem("{type='QMenu' visible='1' title='%s'}" % item, subItem))
sub = itemObject.menu()
waitFor("sub.visible", 1000)
activateItem(waitForObjectItem(sub, subItem))
def logApplicationOutput():
# make sure application output is shown