Files
qt-creator/tests/system/shared/mainwin.py
Bill King 507d260bd4 Fixes openProject, also tests multiple target selection and building.
Change-Id: I4a5aaea2eca940c3ffcf8458b5cc0afce591b63e
Reviewed-on: http://codereview.qt.nokia.com/3886
Reviewed-by: Qt Sanity Bot <qt_sanity_bot@ovi.com>
Reviewed-by: Christian Stenger <christian.stenger@nokia.com>
2011-08-31 14:09:38 +02:00

24 lines
1.3 KiB
Python

def invokeMenuItem(menu, item):
menuObject = waitForObjectItem("{type='QMenuBar' visible='true'}", menu)
activateItem(menuObject)
activateItem(waitForObjectItem(menuObject, item))
def openQmakeProject(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'}")
selectFromCombo(":scrollArea.Create Build Configurations:_QComboBox", "per Qt Version a Debug and Release")
clickButton(findObject("{text='Finish' type='QPushButton'}"))
def openCmakeProject(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'}"))
clickButton(waitForObject(":CMake Wizard.Next_QPushButton", 20000))
clickButton(waitForObject(":CMake Wizard.Run CMake_QPushButton", 20000))
clickButton(waitForObject(":CMake Wizard.Finish_QPushButton", 60000))