Files
qt-creator/tests/system/suite_QMLS/shared/qmls.py
Jan Kerekes 7b51bfc845 Refactoring of QMLS suites
- moved common parts to shared script

Change-Id: I25ac888d7103ee36edff9ead502fa432a5dc2937
Reviewed-by: Christian Stenger <christian.stenger@nokia.com>
Reviewed-by: Robert Löhning <robert.loehning@nokia.com>
2012-05-11 18:12:00 +02:00

25 lines
1016 B
Python

source("../../shared/qtcreator.py")
source("../../shared/suites_qtta.py")
def startQtCreatorWithNewAppAtQMLEditor(projectDir, projectName, line = None):
startApplication("qtcreator" + SettingsPath)
# create qt quick application
createNewQtQuickApplication(projectDir, projectName)
# open qml file
doubleClickItem(":Qt Creator_Utils::NavigationTreeView", projectName + ".QML.qml/" +
projectName + ".main\\.qml", 5, 5, 0, Qt.LeftButton)
# get editor
editorArea = waitForObject(":Qt Creator_QmlJSEditor::QmlJSTextEditorWidget")
# place to line if needed
if line:
# place cursor to component
if not placeCursorToLine(editorArea, line):
invokeMenuItem("File", "Exit")
return None
return editorArea
def verifyCurrentLine(editorArea, currentLineExpectedText, verifyMessage):
currentLineText = str(lineUnderCursor(editorArea)).strip();
return test.compare(currentLineText, currentLineExpectedText, verifyMessage)