1 | # -*- coding: utf-8 -*- |
---|
2 | |
---|
3 | def main(): |
---|
4 | startApplication("sasview") |
---|
5 | clickButton(waitForObject(":groupBox.cmdLoad_QPushButton")) |
---|
6 | waitForObjectItem(":stackedWidget.listView_QListView", "test") |
---|
7 | doubleClickItem(":stackedWidget.listView_QListView", "test", 51, 8, 0, Qt.LeftButton) |
---|
8 | waitForObjectItem(":stackedWidget.listView_QListView", "2d\\_data") |
---|
9 | doubleClickItem(":stackedWidget.listView_QListView", "2d\\_data", 64, 8, 0, Qt.LeftButton) |
---|
10 | waitForObjectItem(":stackedWidget.listView_QListView", "P123\\_D2O\\_30\\_percent\\.dat") |
---|
11 | doubleClickItem(":stackedWidget.listView_QListView", "P123\\_D2O\\_30\\_percent\\.dat", 92, 8, 0, Qt.LeftButton) |
---|
12 | clickButton(waitForObject(":groupBox.cmdSendTo_QPushButton")) |
---|
13 | mouseClick(waitForObject(":groupBox_6.cbCategory_QComboBox_2"), 140, 15, 0, Qt.LeftButton) |
---|
14 | mouseClick(waitForObjectItem(":groupBox_6.cbCategory_QComboBox_2", "Sphere"), 127, 10, 0, Qt.LeftButton) |
---|
15 | mouseClick(waitForObject(":groupBox_6.cbModel_QComboBox_2"), 73, 11, 0, Qt.LeftButton) |
---|
16 | mouseClick(waitForObjectItem(":groupBox_6.cbModel_QComboBox_2", "core\\_shell\\_sphere"), 78, 8, 0, Qt.LeftButton) |
---|
17 | test.compare(str(waitForObjectExists(":groupBox_8.lblMinRangeDef_QLabel").text), "0") |
---|
18 | test.compare(str(waitForObjectExists(":groupBox_8.lblMaxRangeDef_QLabel").text), "0.141421356237") |
---|
19 | test.compare(str(waitForObjectExists(":groupBox_9.lblChi2Value_QLabel").text), "481.82") |
---|
20 | test.compare(waitForObjectExists(":FittingWidgetUI.cmdFit_QPushButton").enabled, False) |
---|
21 | waitForObjectItem(":groupBox_6.lstParams_QTreeView_4", "sld\\_solvent") |
---|
22 | clickItem(":groupBox_6.lstParams_QTreeView_4", "sld\\_solvent", 10, 10, 0, Qt.LeftButton) |
---|
23 | waitForObjectItem(":groupBox_6.lstParams_QTreeView_4", "sld\\_shell") |
---|
24 | clickItem(":groupBox_6.lstParams_QTreeView_4", "sld\\_shell", 13, 8, 0, Qt.LeftButton) |
---|
25 | test.compare(waitForObjectExists(":FittingWidgetUI.cmdFit_QPushButton").enabled, True) |
---|
26 | clickButton(waitForObject(":FittingWidgetUI.cmdFit_QPushButton")) |
---|
27 | snooze(2) |
---|
28 | test.compare(waitForObjectExists(":lstParams.4.2551_QModelIndex").text, "4.2551") |
---|
29 | test.compare(str(waitForObjectExists(":groupBox_9.lblChi2Value_QLabel_2").text), "37.303") |
---|
30 | test.compare(waitForObjectExists(":qt_workspacechild_FigureCanvasQTAgg_4").visible, True) |
---|
31 | test.compare(waitForObjectExists(":qt_workspacechild_FigureCanvasQTAgg_3").visible, True) |
---|
32 | test.compare(waitForObjectExists(":qt_workspacechild_FigureCanvasQTAgg_2").visible, True) |
---|
33 | test.compare(str(waitForObjectExists(":Figure 6_MainWindow").windowTitle), "Figure 6") |
---|
34 | test.compare(str(waitForObjectExists(":Figure 5_MainWindow").windowTitle), "Figure 5") |
---|
35 | test.compare(str(waitForObjectExists(":Figure 4_MainWindow").windowTitle), "Figure 4") |
---|