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", 38, 14, 0, Qt.LeftButton) |
---|
8 | waitForObjectItem(":stackedWidget.listView_QListView", "1d\\_data") |
---|
9 | doubleClickItem(":stackedWidget.listView_QListView", "1d\\_data", 19, 6, 0, Qt.LeftButton) |
---|
10 | waitForObjectItem(":stackedWidget.listView_QListView", "cyl\\_400\\_20\\.txt") |
---|
11 | doubleClickItem(":stackedWidget.listView_QListView", "cyl\\_400\\_20\\.txt", 78, 7, 0, Qt.LeftButton) |
---|
12 | |
---|
13 | mouseClick(waitForObject(":groupBox_6.cbCategory_QComboBox_2"), 170, 13, 0, Qt.LeftButton) |
---|
14 | mouseClick(waitForObjectItem(":groupBox_6.cbCategory_QComboBox_2", "Cylinder"), 137, 10, 0, Qt.LeftButton) |
---|
15 | |
---|
16 | clickButton(waitForObject(":groupBox_3.cmdNew_QPushButton")) |
---|
17 | snooze(3) |
---|
18 | test.compare(waitForObjectExists(":qt_workspacechild.Graph1_QWorkspaceTitleBar").visible, True) |
---|
19 | test.compare(str(waitForObjectExists(":qt_workspacechild.Graph1_QWorkspaceTitleBar").windowTitle), "Graph1") |
---|
20 | test.vp("VP1") |
---|
21 | #mouseDrag(waitForObject(":qt_workspacechild.Graph1_QWorkspaceTitleBar"), 631, 15, 675, 0, 1, Qt.LeftButton) |
---|
22 | |
---|
23 | #mouseClick(waitForObject(":groupBox_6.cbModel_QComboBox_2"), 85, 13, 0, Qt.LeftButton) |
---|
24 | mouseClick(waitForObject(":groupBox_6.cbModel_QComboBox_3"), 79, 11, 0, Qt.LeftButton) |
---|
25 | mouseClick(waitForObjectItem(":groupBox_6.cbModel_QComboBox_3", "cylinder"), 67, 2, 0, Qt.LeftButton) |
---|
26 | #mouseClick(waitForObjectItem(":groupBox_6.cbModel_QComboBox_2", "cylinder"), 80, 5, 0, Qt.LeftButton) |
---|
27 | #mouseClick(waitForObject(":groupBox_6.cbModel_QComboBox_2"), 63, 9, 0, Qt.LeftButton) |
---|
28 | #mouseClick(waitForObjectItem(":groupBox_6.cbModel_QComboBox_2", "cylinder"), 51, 6, 0, Qt.LeftButton) |
---|
29 | |
---|
30 | waitForObjectItem(":groupBox_6.lstParams_QTreeView_2", "scale") |
---|
31 | clickItem(":groupBox_6.lstParams_QTreeView_2", "scale", 9, 10, 0, Qt.LeftButton) |
---|
32 | clickButton(waitForObject(":groupBox.cmdSendTo_QPushButton")) |
---|
33 | waitForObjectItem(":groupBox_6.lstParams_QTreeView_2", "background") |
---|
34 | clickItem(":groupBox_6.lstParams_QTreeView_2", "background", 7, 9, 0, Qt.LeftButton) |
---|
35 | clickButton(waitForObject(":FittingWidgetUI.cmdFit_QPushButton")) |
---|
36 | snooze(1) |
---|
37 | test.compare(str(waitForObjectExists(":groupBox_9.lblChi2Value_QLabel_2").text), "54.058") |
---|
38 | test.compare(waitForObjectExists(":groupBox_9.lblChi2Value_QLabel_2").visible, True) |
---|
39 | test.compare(waitForObjectExists(":qt_workspacechild.Graph4_QWorkspaceTitleBar").visible, True) |
---|
40 | test.compare(str(waitForObjectExists(":qt_workspacechild.Graph4_QWorkspaceTitleBar").windowTitle), "Graph4") |
---|
41 | test.compare(waitForObjectExists(":qt_workspacechild_FigureCanvasQTAgg_3").visible, True) |
---|
42 | test.compare(waitForObjectExists(":qt_workspacechild.Graph3_QWorkspaceTitleBar").visible, True) |
---|
43 | test.compare(str(waitForObjectExists(":qt_workspacechild.Graph3_QWorkspaceTitleBar").windowTitle), "Graph3") |
---|
44 | sendEvent("QMouseEvent", waitForObject(":qt_workspacechild.Customize_QLabel"), QEvent.MouseButtonPress, 283, 24, Qt.LeftButton, 1, 0) |
---|
45 | sendEvent("QMouseEvent", waitForObject(":qt_workspacechild.Customize_QLabel_2"), QEvent.MouseButtonRelease, 283, 24, Qt.LeftButton, 0, 0) |
---|
46 | test.compare(waitForObjectExists(":qt_workspacechild.Graph2_QWorkspaceTitleBar").visible, True) |
---|
47 | test.compare(str(waitForObjectExists(":qt_workspacechild.Graph2_QWorkspaceTitleBar").windowTitle), "Graph2") |
---|
48 | sendEvent("QMouseEvent", waitForObject(":qt_workspacechild.Graph3_QWorkspaceTitleBar_2"), QEvent.MouseButtonPress, 96, 22, Qt.LeftButton, 1, 0) |
---|
49 | sendEvent("QMouseEvent", waitForObject(":qt_workspacechild.Graph3_QWorkspaceTitleBar_3"), QEvent.MouseButtonRelease, 96, 22, Qt.LeftButton, 0, 0) |
---|
50 | test.vp("VP2") |
---|
51 | test.compare(waitForObjectExists(":lstParams.0.72485_QModelIndex").text, "0.72485") |
---|
52 | test.compare(waitForObjectExists(":lstParams.0.2338_QModelIndex").text, "0.2338") |
---|
53 | test.compare(waitForObjectExists(":groupBox_3.cbgraph_QComboBox").count, 3) |
---|