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", 44, 10, 0, Qt.LeftButton) |
---|
8 | waitForObjectItem(":stackedWidget.listView_QListView", "1d\\_data") |
---|
9 | doubleClickItem(":stackedWidget.listView_QListView", "1d\\_data", 42, 4, 0, Qt.LeftButton) |
---|
10 | waitForObjectItem(":stackedWidget.listView_QListView", "cyl\\_400\\_20\\.txt") |
---|
11 | doubleClickItem(":stackedWidget.listView_QListView", "cyl\\_400\\_20\\.txt", 73, 5, 0, Qt.LeftButton) |
---|
12 | clickButton(waitForObject(":groupBox.cmdSendTo_QPushButton")) |
---|
13 | clickTab(waitForObject(":FittingWidgetUI.tabFitting_QTabWidget_2"), "Fit Options") |
---|
14 | mouseDrag(waitForObject(":groupBox_4.txtMinRange_QLineEdit"), 21, 13, 20, 3, 1, Qt.LeftButton) |
---|
15 | type(waitForObject(":groupBox_4.txtMinRange_QLineEdit"), "5") |
---|
16 | mouseClick(waitForObject(":groupBox_4.txtMaxRange_QLineEdit"), 20, 11, 0, Qt.LeftButton) |
---|
17 | type(waitForObject(":groupBox_4.txtMaxRange_QLineEdit"), "<Backspace>") |
---|
18 | type(waitForObject(":groupBox_4.txtMaxRange_QLineEdit"), "<Backspace>") |
---|
19 | type(waitForObject(":groupBox_4.txtMaxRange_QLineEdit"), "<Backspace>") |
---|
20 | type(waitForObject(":groupBox_4.txtMaxRange_QLineEdit"), "1.0") |
---|
21 | type(waitForObject(":groupBox_4.txtMaxRange_QLineEdit"), "<Tab>") |
---|
22 | clickTab(waitForObject(":FittingWidgetUI.tabFitting_QTabWidget_2"), "Model") |
---|
23 | test.compare(str(waitForObjectExists(":groupBox_8.lblMinRangeDef_QLabel").text), "0.05") |
---|
24 | test.compare(str(waitForObjectExists(":groupBox_8.lblMaxRangeDef_QLabel").text), "1.0") |
---|
25 | mouseClick(waitForObject(":groupBox_6.cbCategory_QComboBox_2"), 170, 7, 0, Qt.LeftButton) |
---|
26 | mouseClick(waitForObjectItem(":groupBox_6.cbCategory_QComboBox_2", "Cylinder"), 154, 3, 0, Qt.LeftButton) |
---|
27 | clickTab(waitForObject(":FittingWidgetUI.tabFitting_QTabWidget_2"), "Fit Options") |
---|
28 | test.compare(waitForObjectExists(":groupBox_5.txtNpts_QLineEdit").enabled, False) |
---|
29 | test.compare(str(waitForObjectExists(":groupBox_5.txtNpts_QLineEdit").text), "20") |
---|
30 | test.compare(waitForObjectExists(":groupBox_5.txtNpts_QLineEdit").visible, True) |
---|
31 | test.compare(waitForObjectExists(":groupBox_5.txtNptsFit_QLineEdit").visible, True) |
---|
32 | test.compare(str(waitForObjectExists(":groupBox_5.txtNptsFit_QLineEdit").text), "50") |
---|
33 | test.compare(waitForObjectExists(":groupBox_5.txtNptsFit_QLineEdit").enabled, False) |
---|
34 | activateItem(waitForObjectItem(":MainWindow.menubar_QMenuBar", "Fitting")) |
---|
35 | activateItem(waitForObjectItem(":MainWindow.menuFitting_QMenu", "New Fit Page")) |
---|
36 | clickTab(waitForObject(":qt_workspacechild.FitPage0_FittingWindow"), "FitPage1") |
---|
37 | mouseClick(waitForObject(":groupBox_6.cbCategory_QComboBox_2"), 154, 13, 0, Qt.LeftButton) |
---|
38 | mouseClick(waitForObjectItem(":groupBox_6.cbCategory_QComboBox_2", "Cylinder"), 137, 4, 0, Qt.LeftButton) |
---|
39 | clickTab(waitForObject(":FittingWidgetUI.tabFitting_QTabWidget_2"), "Fit Options") |
---|
40 | test.compare(waitForObjectExists(":groupBox_5.txtNpts_QLineEdit").enabled, True) |
---|
41 | test.compare(waitForObjectExists(":groupBox_5.txtNpts_QLineEdit").visible, True) |
---|
42 | test.compare(str(waitForObjectExists(":groupBox_5.txtNpts_QLineEdit").text), "25") |
---|
43 | test.compare(waitForObjectExists(":groupBox_5.txtNptsFit_QLineEdit").visible, True) |
---|
44 | test.compare(waitForObjectExists(":groupBox_5.txtNptsFit_QLineEdit").enabled, True) |
---|
45 | test.compare(str(waitForObjectExists(":groupBox_5.txtNptsFit_QLineEdit").text), "50") |
---|
46 | test.compare(waitForObjectExists(":groupBox_5.txtChi2_QLineEdit").enabled, True) |
---|
47 | test.compare(str(waitForObjectExists(":groupBox_5.txtChi2_QLineEdit").text), "") |
---|
48 | test.compare(waitForObjectExists(":groupBox_5.txtChi2_QLineEdit").visible, True) |
---|
49 | test.compare(waitForObjectExists(":tabOptions.boxWeighting_QGroupBox").enabled, False) |
---|
50 | clickButton(waitForObject(":FittingWidgetUI.cmdPlot_QPushButton_2")) |
---|
51 | clickButton(waitForObject(":FittingWidgetUI.cmdPlot_QPushButton_2")) |
---|
52 | sendEvent("QMouseEvent", waitForObject(":groupBox_4.txtMinRange_QLineEdit"), QEvent.MouseButtonPress, 53, 11, Qt.LeftButton, 1, 0) |
---|
53 | #sendEvent("QMouseEvent", waitForObject(":groupBox_4.txtMinRange_QLineEdit_2"), QEvent.MouseButtonRelease, 53, 11, Qt.LeftButton, 0, 0) |
---|
54 | type(waitForObject(":groupBox_4.txtMinRange_QLineEdit"), "<Backspace>") |
---|
55 | type(waitForObject(":groupBox_4.txtMinRange_QLineEdit"), "<Backspace>") |
---|
56 | type(waitForObject(":groupBox_4.txtMinRange_QLineEdit"), "<Backspace>") |
---|
57 | type(waitForObject(":groupBox_4.txtMinRange_QLineEdit"), "<Backspace>") |
---|
58 | type(waitForObject(":groupBox_4.txtMinRange_QLineEdit"), "<Backspace>") |
---|
59 | type(waitForObject(":groupBox_4.txtMinRange_QLineEdit"), "0.5") |
---|
60 | type(waitForObject(":groupBox_4.txtMinRange_QLineEdit"), "<Tab>") |
---|
61 | type(waitForObject(":groupBox_4.txtMaxRange_QLineEdit"), "1") |
---|
62 | type(waitForObject(":groupBox_4.txtMaxRange_QLineEdit"), "<Tab>") |
---|
63 | mouseDrag(waitForObject(":groupBox_5.txtNpts_QLineEdit"), 32, 9, -8, 3, 1, Qt.LeftButton) |
---|
64 | type(waitForObject(":groupBox_5.txtNpts_QLineEdit"), "<Backspace>") |
---|
65 | type(waitForObject(":groupBox_5.txtNpts_QLineEdit"), "<Backspace>") |
---|
66 | type(waitForObject(":groupBox_5.txtNpts_QLineEdit"), "100") |
---|
67 | type(waitForObject(":groupBox_5.txtNpts_QLineEdit"), "<Tab>") |
---|
68 | clickTab(waitForObject(":FittingWidgetUI.tabFitting_QTabWidget_3"), "Model") |
---|
69 | test.compare(str(waitForObjectExists(":groupBox_8.lblMinRangeDef_QLabel_2").text), "0.5") |
---|
70 | test.compare(str(waitForObjectExists(":groupBox_8.lblMaxRangeDef_QLabel_2").text), "1.0") |
---|
71 | test.vp("VP1") |
---|