[9c39b317] | 1 | # -*- coding: utf-8 -*- |
---|
| 2 | |
---|
| 3 | def main(): |
---|
| 4 | startApplication("sasview") |
---|
| 5 | clickTab(waitForObject(":Data Explorer.DataLoadWidget_DataExplorerWindow"), "Theory") |
---|
| 6 | mouseClick(waitForObject(":groupBox_6.cbCategory_QComboBox"), 164, 12, 0, Qt.LeftButton) |
---|
| 7 | mouseClick(waitForObjectItem(":groupBox_6.cbCategory_QComboBox", "Cylinder"), 154, 1, 0, Qt.LeftButton) |
---|
| 8 | mouseClick(waitForObject(":groupBox_6.cbModel_QComboBox"), 53, 12, 0, Qt.LeftButton) |
---|
| 9 | mouseClick(waitForObjectItem(":groupBox_6.cbModel_QComboBox", "core\\_shell\\_bicelle\\_elliptical"), 80, 10, 0, Qt.LeftButton) |
---|
| 10 | |
---|
| 11 | test.compare(str(waitForObjectExists(":FittingWidgetUI.cmdPlot_QPushButton_2").text), "Calculate") |
---|
| 12 | test.compare(waitForObjectExists(":FittingWidgetUI.cmdFit_QPushButton").visible, True) |
---|
| 13 | test.compare(waitForObjectExists(":FittingWidgetUI.cmdFit_QPushButton").enabled, False) |
---|
| 14 | test.compare(waitForObjectExists(":FittingWidgetUI.cmdHelp_QPushButton").enabled, True) |
---|
| 15 | clickButton(waitForObject(":FittingWidgetUI.cmdPlot_QPushButton_2")) |
---|
| 16 | snooze(2) |
---|
| 17 | test.compare(waitForObjectExists(":FittingWidgetUI.cmdPlot_QPushButton_2").enabled, True) |
---|
| 18 | test.compare(str(waitForObjectExists(":FittingWidgetUI.cmdPlot_QPushButton_2").text), "Show Plot") |
---|
| 19 | test.compare(waitForObjectExists(":freezeView.M1 [core_shell_bicelle_elliptical]_QModelIndex").checkState, "checked") |
---|
| 20 | test.compare(waitForObjectExists(":freezeView.M1 [core_shell_bicelle_elliptical]_QModelIndex").collapsed, True) |
---|
| 21 | test.compare(waitForObjectExists(":freezeView.M1 [core_shell_bicelle_elliptical]_QModelIndex").text, "M1 [core_shell_bicelle_elliptical]") |
---|
| 22 | waitForObjectItem(":groupBox_2.freezeView_QTreeView", "M1 [core\\_shell\\_bicelle\\_elliptical]") |
---|
| 23 | clickItem(":groupBox_2.freezeView_QTreeView", "M1 [core\\_shell\\_bicelle\\_elliptical]", -8, 8, 0, Qt.LeftButton) |
---|
| 24 | waitForObjectItem(":groupBox_2.freezeView_QTreeView", "M1 [core\\_shell\\_bicelle\\_elliptical].Info") |
---|
| 25 | clickItem(":groupBox_2.freezeView_QTreeView", "M1 [core\\_shell\\_bicelle\\_elliptical].Info", -5, 8, 0, Qt.LeftButton) |
---|
| 26 | clickButton(waitForObject(":groupBox_2.cmdFreeze_QPushButton")) |
---|
| 27 | clickTab(waitForObject(":Data Explorer.DataLoadWidget_DataExplorerWindow"), "Data") |
---|
| 28 | # Figure out how to use wildcards within waitForObjectExists() argument list |
---|
| 29 | |
---|
| 30 | #test.compare(waitForObjectExists(":treeView.M1 [core_shell_bicelle_elliptical]_@????_QModelIndex").enabled, True) |
---|
| 31 | #test.compare(waitForObjectExists("{column='0' container=':groupBox.treeView_QTreeView' text?='M1 [core_shell_bicelle_elliptical]_@*' type='QModelIndex'}").enabled, True) |
---|
| 32 | #test.compare(waitForObjectExists(":treeView.M1 [core_shell_bicelle_elliptical]_@????_QModelIndex").checkState, "checked") |
---|
| 33 | #test.compare(waitForObjectExists(":treeView.M1 [core_shell_bicelle_elliptical]_@????_QModelIndex").text, "M1 [core_shell_bicelle_elliptical]_@????") |
---|
| 34 | |
---|
| 35 | clickTab(waitForObject(":Data Explorer.DataLoadWidget_DataExplorerWindow"), "Theory") |
---|
| 36 | clickButton(waitForObject(":groupBox_4.cmdNew_2_QPushButton")) |
---|
| 37 | test.compare(waitForObjectExists(":qt_workspacechild.Graph1_QWorkspaceTitleBar").enabled, True) |
---|
| 38 | test.compare(waitForObjectExists(":qt_workspacechild.Graph1_QWorkspaceTitleBar").visible, True) |
---|
| 39 | test.compare(str(waitForObjectExists(":qt_workspacechild.Graph1_QWorkspaceTitleBar").windowTitle), "Graph1") |
---|
| 40 | test.vp("VP1") |
---|
| 41 | |
---|