source("../../shared/qtcreator.py") source("../../shared/suites_qtta.py") # test context sensitive help in edit mode # place cursor to keyword, in , and verify help to contain def verifyInteractiveQMLHelp(lineText, helpText): editorArea = waitForObject(":Qt Creator_QmlJSEditor::QmlJSTextEditorWidget") # go to the specified word placeCursorToLine(editorArea, lineText) homeKey = "" if platform.system() == "Darwin": homeKey = "" type(editorArea, homeKey) else: type(editorArea, homeKey) # call help type(editorArea, "") test.verify(helpText in str(waitForObject(":Qt Creator_Help::Internal::HelpViewer").title), "Verifying if help is opened with documentation for '%s'." % helpText) def main(): startApplication("qtcreator" + SettingsPath) addHelpDocumentationFromSDK() # create qt quick application createNewQtQuickApplication(tempDir(), "SampleApp") # verify Rectangle help verifyInteractiveQMLHelp("Rectangle {", "QML Rectangle Element") # go back to edit mode switchViewTo(ViewConstants.EDIT) # verify MouseArea help verifyInteractiveQMLHelp("MouseArea {", "QML MouseArea Element") # exit invokeMenuItem("File","Exit")