Files
qt-creator/tests/system/shared/mainwin.py
Bill King 756fb87983 Initial commit of squish tests for creator.
Change-Id: Ic499b3c36d37f9789276f60a41642ffc7ee816d1
Reviewed-on: http://codereview.qt.nokia.com/3047
Reviewed-by: Qt Sanity Bot <qt_sanity_bot@ovi.com>
Reviewed-by: Bill King <bill.king@nokia.com>
2011-08-26 09:46:31 +02:00

14 lines
698 B
Python

def invokeMenuItem(menu, item):
menuObject = waitForObjectItem("{type='QMenuBar' visible='true'}", menu)
activateItem(menuObject)
activateItem(waitForObjectItem(menuObject, item))
def openProject(projectPath):
invokeMenuItem("File", "Open File or Project...")
waitForObject("{name='QFileDialog' type='QFileDialog' visible='1' windowTitle='Open File'}")
type(findObject("{name='fileNameEdit' type='QLineEdit'}"), projectPath)
clickButton(findObject("{text='Open' type='QPushButton'}"))
waitForObject("{type='Qt4ProjectManager::Internal::ProjectLoadWizard' visible='1' windowTitle='Project Setup'}")
clickButton(findObject("{text='Finish' type='QPushButton'}"))